Class: StandardId::Oauth::SocialFlow
- Inherits:
-
TokenGrantFlow
- Object
- BaseRequestFlow
- TokenGrantFlow
- StandardId::Oauth::SocialFlow
- Defined in:
- lib/standard_id/oauth/social_flow.rb
Instance Attribute Summary collapse
-
#account ⇒ Object
readonly
Returns the value of attribute account.
-
#connection ⇒ Object
readonly
Returns the value of attribute connection.
-
#scopes ⇒ Object
readonly
Returns the value of attribute scopes.
Attributes inherited from TokenGrantFlow
Attributes inherited from BaseRequestFlow
#current_account, #params, #request
Instance Method Summary collapse
- #authenticate! ⇒ Object
-
#initialize(params, request, account:, connection:, scopes:) ⇒ SocialFlow
constructor
A new instance of SocialFlow.
Methods inherited from TokenGrantFlow
#execute, extra_permitted_keys
Methods inherited from BaseRequestFlow
expect_params, expected_params, extra_permitted_keys, permit_params, permitted_params
Constructor Details
#initialize(params, request, account:, connection:, scopes:) ⇒ SocialFlow
Returns a new instance of SocialFlow.
6 7 8 9 10 11 |
# File 'lib/standard_id/oauth/social_flow.rb', line 6 def initialize(params, request, account:, connection:, scopes:) super(params, request) @account = account @connection = connection @scopes = validate_and_normalize_scopes(scopes) end |
Instance Attribute Details
#account ⇒ Object (readonly)
Returns the value of attribute account.
4 5 6 |
# File 'lib/standard_id/oauth/social_flow.rb', line 4 def account @account end |
#connection ⇒ Object (readonly)
Returns the value of attribute connection.
4 5 6 |
# File 'lib/standard_id/oauth/social_flow.rb', line 4 def connection @connection end |
#scopes ⇒ Object (readonly)
Returns the value of attribute scopes.
4 5 6 |
# File 'lib/standard_id/oauth/social_flow.rb', line 4 def scopes @scopes end |
Instance Method Details
#authenticate! ⇒ Object
13 14 15 |
# File 'lib/standard_id/oauth/social_flow.rb', line 13 def authenticate! raise StandardId::InvalidGrantError, "Account is required for social flow" if @account.blank? end |