Class: OmniAuth::Strategies::MicrosoftV2Auth
- Inherits:
-
OAuth2
- Object
- OAuth2
- OmniAuth::Strategies::MicrosoftV2Auth
- Defined in:
- lib/omniauth/strategies/microsoft_v2_auth.rb
Constant Summary collapse
- DEFAULT_SCOPE =
'openid email profile https://graph.microsoft.com/User.Read'
Instance Method Summary collapse
Instance Method Details
#authorize_params ⇒ Object
37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/omniauth/strategies/microsoft_v2_auth.rb', line 37 def super.tap do |params| %w[display score auth_type].each do |v| if request.params[v] params[v.to_sym] = request.params[v] end end params[:scope] ||= DEFAULT_SCOPE end end |
#callback_url ⇒ Object
49 50 51 |
# File 'lib/omniauth/strategies/microsoft_v2_auth.rb', line 49 def callback_url [:redirect_uri] || (full_host + script_name + callback_path) end |
#raw_info ⇒ Object
33 34 35 |
# File 'lib/omniauth/strategies/microsoft_v2_auth.rb', line 33 def raw_info @raw_info ||= access_token.get('https://graph.microsoft.com/v1.0/me').parsed end |