Class: Ably::Models::AuthDetails

Inherits:
Object
  • Object
show all
Includes:
Ably::Modules::ModelCommon
Defined in:
lib/submodules/ably-ruby/lib/ably/models/auth_details.rb

Overview

AuthDetails are included in an AUTH ProtocolMessage#auth attribute to provide the realtime service with new token authentication details following a re-auth workflow

Instance Attribute Summary collapse

Attributes included from Ably::Modules::ModelCommon

#hash

Instance Method Summary collapse

Methods included from Ably::Modules::ModelCommon

#==, #[], #as_json, included, #to_json, #to_s

Methods included from Ably::Modules::MessagePack

#to_msgpack

Constructor Details

#initialize(attributes = {}) ⇒ AuthDetails

Returns a new instance of AuthDetails.

Parameters:

  • attributes (Hash) (defaults to: {})

Options Hash (attributes):

  • :access_token (String)

    token string



25
26
27
28
# File 'lib/submodules/ably-ruby/lib/ably/models/auth_details.rb', line 25

def initialize(attributes = {})
  @hash_object = IdiomaticRubyWrapper(attributes.clone)
  self.attributes.freeze
end

Instance Attribute Details

#attributesHash (readonly)

Returns Access the token details Hash object ruby'fied to use symbolized keys.

Returns:

  • (Hash)

    Access the token details Hash object ruby'fied to use symbolized keys



38
39
40
# File 'lib/submodules/ably-ruby/lib/ably/models/auth_details.rb', line 38

def attributes
  @hash_object
end