Class: Wire4Auth::CachedToken

Inherits:
Object
  • Object
show all
Defined in:
lib/wire4_auth/core/cached_token.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(user_key, user_secret, access_token) ⇒ CachedToken

Returns a new instance of CachedToken.



29
30
31
32
33
34
35
36
# File 'lib/wire4_auth/core/cached_token.rb', line 29

def initialize(user_key, user_secret, access_token)

  raise 'Not OAuth2::AccessToken class instance' unless access_token.nil? or access_token.is_a? OAuth2::AccessToken

  @user_key = user_key
  @user_secret = user_secret
  @access_token = access_token
end

Instance Attribute Details

#access_tokenObject

Returns the value of attribute access_token.



27
28
29
# File 'lib/wire4_auth/core/cached_token.rb', line 27

def access_token
  @access_token
end

#user_keyObject (readonly)

Returns the value of attribute user_key.



23
24
25
# File 'lib/wire4_auth/core/cached_token.rb', line 23

def user_key
  @user_key
end

#user_secretObject (readonly)

Returns the value of attribute user_secret.



25
26
27
# File 'lib/wire4_auth/core/cached_token.rb', line 25

def user_secret
  @user_secret
end