Class: Arkaan::OAuth::Authorization
- Inherits:
-
Object
- Object
- Arkaan::OAuth::Authorization
- Includes:
- Mongoid::Document, Mongoid::Timestamps
- Defined in:
- lib/arkaan/oauth/authorization.rb
Overview
An OAuth authorization is granted by a user to an application to access its personal data.
Instance Attribute Summary collapse
-
#account ⇒ Arkaaan::Account
The account granting the authorization to access its data to the application.
-
#application ⇒ Arkaan::OAuth::Application
The application asking to access account’s data.
-
#code ⇒ String
The value corresponding to the authentication code in the RFC of OAuth2.0, kep for historic purpose.
-
#token ⇒ Arkaan::OAuth::AccessToken
The access token used further in the application process to access private data of the account.
Instance Attribute Details
#account ⇒ Arkaaan::Account
Returns the account granting the authorization to access its data to the application.
15 |
# File 'lib/arkaan/oauth/authorization.rb', line 15 belongs_to :account, class_name: 'Arkaan::Account', inverse_of: :authorizations |
#application ⇒ Arkaan::OAuth::Application
Returns the application asking to access account’s data.
18 |
# File 'lib/arkaan/oauth/authorization.rb', line 18 belongs_to :application, class_name: 'Arkaan::OAuth::Application', inverse_of: :authorizations |
#code ⇒ String
Returns the value corresponding to the authentication code in the RFC of OAuth2.0, kep for historic purpose.
11 |
# File 'lib/arkaan/oauth/authorization.rb', line 11 field :code, type: String, default: ->{ SecureRandom.hex } |
#token ⇒ Arkaan::OAuth::AccessToken
Returns the access token used further in the application process to access private data of the account.
21 |
# File 'lib/arkaan/oauth/authorization.rb', line 21 has_one :token, class_name: 'Arkaan::OAuth::AccessToken', inverse_of: :authorization |