Sha256: 6d2a15e1e2689b3a488ab69fdb9d49b72f784ffbea3ac1495082ed22be28a17b

Contents?: true

Size: 319 Bytes

Versions: 25

Compression:

Stored size: 319 Bytes

Contents

Auth0::AccessToken = Struct.new(
  :access_token,
  :expires_in,
  :refresh_token,
  :id_token
) do

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

  def token
    access_token
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
auth0-5.18.0 lib/auth0/mixins/access_token_struct.rb
auth0-5.16.0 lib/auth0/mixins/access_token_struct.rb
auth0-5.15.0 lib/auth0/mixins/access_token_struct.rb
auth0-5.14.2 lib/auth0/mixins/access_token_struct.rb
auth0-5.14.1 lib/auth0/mixins/access_token_struct.rb
auth0-5.14.0 lib/auth0/mixins/access_token_struct.rb
auth0-5.13.0 lib/auth0/mixins/access_token_struct.rb
auth0-5.12.0 lib/auth0/mixins/access_token_struct.rb
auth0-5.11.0 lib/auth0/mixins/access_token_struct.rb
auth0-5.10.0 lib/auth0/mixins/access_token_struct.rb
auth0-5.9.0 lib/auth0/mixins/access_token_struct.rb
auth0-5.8.1 lib/auth0/mixins/access_token_struct.rb
auth0-5.8.0 lib/auth0/mixins/access_token_struct.rb
auth0-5.7.0 lib/auth0/mixins/access_token_struct.rb
auth0-5.6.1 lib/auth0/mixins/access_token_struct.rb
auth0-5.6.0 lib/auth0/mixins/access_token_struct.rb
auth0-5.5.0 lib/auth0/mixins/access_token_struct.rb
auth0-5.4.0 lib/auth0/mixins/access_token_struct.rb
auth0-5.3.0 lib/auth0/mixins/access_token_struct.rb
auth0-5.2.0 lib/auth0/mixins/access_token_struct.rb