marknadig
(Mark Nadig)
2017 年9 月 20 日 16:05
11
Crosspoting from gitub. I’m not in a position to test this out at the moment, however it appears that we’re just grabbing the ‘email’ attribute returned from Azure.
line 52 of
require 'omniauth/strategies/oauth2'
require 'jwt'
module OmniAuth
module Strategies
class AzureOauth2 < OmniAuth::Strategies::OAuth2
BASE_AZURE_URL = 'https://login.microsoftonline.com'
option :name, 'azure_oauth2'
option :tenant_provider, nil
# AD resource identifier
option :resource, '00000002-0000-0000-c000-000000000000'
# tenant_provider must return client_id, client_secret and optionally tenant_id and base_azure_url
args [:tenant_provider]
def client
if options.tenant_provider
This file has been truncated. show original