Class: Virtuaservices::OAuth::Application
- Inherits:
-
Object
- Object
- Virtuaservices::OAuth::Application
- Includes:
- Mongoid::Document, Mongoid::Timestamps
- Defined in:
- lib/virtuaservices/oauth/application.rb
Overview
An application is what is referred to in the OAuth2.0 RFC as a client, wanting to access private informations about the user.
Instance Attribute Summary collapse
-
#creator ⇒ Virtuaservices::Account
The account that has created this application, considered its owner.
-
#key ⇒ String
The unique key for the application, identifying it when requesting a token for the API.
-
#name ⇒ String
The unique name of the application, mainly used to identify and display it.
-
#premium ⇒ Boolean
A value indicating whether the application should automatically receive a token when an account is created, or not.
Instance Attribute Details
#creator ⇒ Virtuaservices::Account
Returns the account that has created this application, considered its owner.
21 |
# File 'lib/virtuaservices/oauth/application.rb', line 21 belongs_to :creator, class_name: 'Virtuaservices::Account', inverse_of: :applications |
#key ⇒ String
Returns the unique key for the application, identifying it when requesting a token for the API.
14 |
# File 'lib/virtuaservices/oauth/application.rb', line 14 field :key, type: String, default: ->{ SecureRandom.hex } |
#name ⇒ String
Returns the unique name of the application, mainly used to identify and display it.
11 |
# File 'lib/virtuaservices/oauth/application.rb', line 11 field :name, type: String |
#premium ⇒ Boolean
Returns a value indicating whether the application should automatically receive a token when an account is created, or not.
17 |
# File 'lib/virtuaservices/oauth/application.rb', line 17 field :premium, type: Boolean, default: false |