Class: Lapis::Yggdrasil::Messaging::InvalidateRequest

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

Overview

Request for ending a session.

Instance Method Summary collapse

Constructor Details

#initialize(client_token, access_token) ⇒ InvalidateRequest

Creates a new invalidate 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/invalidate_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/invalidate_request.rb', line 20

def endpoint
  '/invalidate'
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/invalidate_request.rb', line 26

def to_json
  structure.to_json
end