Class: OmniAuth::Strategies::MicrosoftOffice365

Inherits:
OAuth2
  • Object
show all
Defined in:
lib/omniauth/strategies/microsoft_office365.rb

Constant Summary collapse

DEFAULT_SCOPE =
"openid email profile https://outlook.office.com/contacts.read"

Instance Method Summary collapse

Instance Method Details

#authorize_paramsObject



41
42
43
44
45
46
47
48
49
50
51
# File 'lib/omniauth/strategies/microsoft_office365.rb', line 41

def authorize_params
  super.tap do |params|
    %w[display scope auth_type].each do |v|
      if request.params[v]
        params[v.to_sym] = request.params[v]
      end
    end

    params[:scope] ||= DEFAULT_SCOPE
  end
end

#raw_infoObject



37
38
39
# File 'lib/omniauth/strategies/microsoft_office365.rb', line 37

def raw_info
  @raw_info ||= access_token.get("https://outlook.office.com/api/v2.0/me/").parsed
end