Class: OmniAuth::Strategies::SageImpact
- Inherits:
-
OAuth2
- Object
- OAuth2
- OmniAuth::Strategies::SageImpact
- Defined in:
- lib/omniauth/strategies/sage_impact.rb
Constant Summary collapse
- DEFAULT_RESPONSE_TYPE =
'code'
- DEFAULT_GRANT =
'authorization_code'
- INFO_URL =
'https://app.sageaccountantscloud.com/api/v1/me'.freeze
Instance Method Summary collapse
-
#authorize_params ⇒ OmniAuth::Strategy::Options
The OAuth2 client authorization parameters.
-
#raw_info ⇒ Hash
Unfiltered data about the authenticating user.
-
#token_params ⇒ OmniAuth::Strategy::Options
The OAuth2 client authentication parameters.
Instance Method Details
#authorize_params ⇒ OmniAuth::Strategy::Options
The OAuth2 client authorization parameters.
35 36 37 38 39 40 |
# File 'lib/omniauth/strategies/sage_impact.rb', line 35 def super.tap do |params| params[:response_type] ||= DEFAULT_RESPONSE_TYPE params[:client_id] = client.id end end |
#raw_info ⇒ Hash
Unfiltered data about the authenticating user.
45 46 47 |
# File 'lib/omniauth/strategies/sage_impact.rb', line 45 def raw_info @raw_info ||= access_token.get(INFO_URL).parsed || {} end |
#token_params ⇒ OmniAuth::Strategy::Options
The OAuth2 client authentication parameters.
52 53 54 55 56 57 58 |
# File 'lib/omniauth/strategies/sage_impact.rb', line 52 def token_params super.tap do |params| params[:grant_type] ||= DEFAULT_GRANT params[:client_id] = client.id params[:client_secret] = client.secret end end |