Class: Lapis::Yggdrasil::Messaging::ValidateRequest

Inherits:
TokenRequest show all
Defined in:
lib/lapis/yggdrasil/messaging/validate_request.rb

Overview

Request for checking if a session is still valid.

Instance Method Summary collapse

Constructor Details

#initialize(client_token, access_token) ⇒ ValidateRequest

Creates a new validate request.

Parameters:

  • client_token (Uuid)

    Unique ID Of the client that performed the authentication.

  • access_token (Uuid)

    Unique ID of the authentication session.



14
15
16
# File 'lib/lapis/yggdrasil/messaging/validate_request.rb', line 14

def initialize(client_token, access_token)
  super(client_token, access_token)
end

Instance Method Details

#endpointString

Path on the server that handles the request.

Returns:

  • (String)

    Path to handler.



20
21
22
# File 'lib/lapis/yggdrasil/messaging/validate_request.rb', line 20

def endpoint
  '/validate'
end

#to_jsonString

Generates a JSON string that can be sent to an authentication server.

Returns:

  • (String)

    JSON string.



26
27
28
# File 'lib/lapis/yggdrasil/messaging/validate_request.rb', line 26

def to_json
  structure.to_json
end