Class: AccessToken

Inherits:
Struct
  • Object
show all
Defined in:
lib/auth0/mixins/access_token_struct.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#access_tokenObject

Returns the value of attribute access_token

Returns:

  • (Object)

    the current value of access_token


1
2
3
# File 'lib/auth0/mixins/access_token_struct.rb', line 1

def access_token
  @access_token
end

#expires_inObject

Returns the value of attribute expires_in

Returns:

  • (Object)

    the current value of expires_in


1
2
3
# File 'lib/auth0/mixins/access_token_struct.rb', line 1

def expires_in
  @expires_in
end

#id_tokenObject

Returns the value of attribute id_token

Returns:

  • (Object)

    the current value of id_token


1
2
3
# File 'lib/auth0/mixins/access_token_struct.rb', line 1

def id_token
  @id_token
end

#refresh_tokenObject

Returns the value of attribute refresh_token

Returns:

  • (Object)

    the current value of refresh_token


1
2
3
# File 'lib/auth0/mixins/access_token_struct.rb', line 1

def refresh_token
  @refresh_token
end

Class Method Details

.from_response(response) ⇒ Object


8
9
10
11
12
13
14
15
# File 'lib/auth0/mixins/access_token_struct.rb', line 8

def self.from_response(response)
  new(
    response['access_token'],
    response['expires_in'],
    response['refresh_token'],
    response['id_token']
  )
end

Instance Method Details

#tokenObject


17
18
19
# File 'lib/auth0/mixins/access_token_struct.rb', line 17

def token
  access_token
end