Class: OmniAuth::Strategies::DoximityOauth2
- Inherits:
-
OAuth2
- Object
- OAuth2
- OmniAuth::Strategies::DoximityOauth2
- Defined in:
- lib/omniauth/strategies/doximity_oauth2.rb
Overview
Doximity OmniAuth strategy.
Constant Summary collapse
- DEFAULT_SCOPE =
"openid profile:read:basic"
Instance Method Summary collapse
-
#authorize_params ⇒ Object
rubocop:disable Metrics/AbcSize.
- #raw_credential_info ⇒ Object
- #raw_subject_info ⇒ Object
Instance Method Details
#authorize_params ⇒ Object
rubocop:disable Metrics/AbcSize
78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/omniauth/strategies/doximity_oauth2.rb', line 78 def # rubocop:disable Metrics/AbcSize super.tap do |params| [:authorize_options].each do |v| params[v.to_sym] = request.params[v.to_s] if request.params[v.to_s] end params[:scope] = get_scope(params) # Ensure state is persisted session['omniauth.state'] = params[:state] if params[:state] end end |
#raw_credential_info ⇒ Object
74 75 76 |
# File 'lib/omniauth/strategies/doximity_oauth2.rb', line 74 def raw_credential_info @raw_credential_info ||= access_token.to_hash.with_indifferent_access end |
#raw_subject_info ⇒ Object
70 71 72 |
# File 'lib/omniauth/strategies/doximity_oauth2.rb', line 70 def raw_subject_info @raw_subject_info ||= parse_id_token(access_token["id_token"] || access_token.get("/oauth/userinfo").body) || {} end |