Class: Lapis::Yggdrasil::Messaging::RefreshResponse

Inherits:
TokenResponse show all
Defined in:
lib/lapis/yggdrasil/messaging/refresh_response.rb

Overview

Response to a session renewal (refresh) request.

See Also:

Instance Attribute Summary collapse

Attributes inherited from TokenResponse

#access_token, #client_token

Attributes inherited from Response

#status

Instance Method Summary collapse

Methods inherited from Response

#ok?

Constructor Details

#initialize(message) ⇒ RefreshResponse

Creates a new refresh response by parsing a message received from the server.

Parameters:

  • message (HTTP::Message)

    Refresh response from the server.



19
20
21
22
23
# File 'lib/lapis/yggdrasil/messaging/refresh_response.rb', line 19

def initialize(message)
  super(message)
  hash     = JSON.parse(message.body, :symbolize_names => true)
  @profile = Profile.from_properties(hash[:selectedProfile])
end

Instance Attribute Details

#profileProfile (readonly)

Profile selected for the user.

Returns:



15
16
17
# File 'lib/lapis/yggdrasil/messaging/refresh_response.rb', line 15

def profile
  @profile
end