File tree 2 files changed +6
-18
lines changed
2 files changed +6
-18
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -15,11 +15,15 @@ var LiveConnectEndpoint = oauth2.Endpoint{
15
15
TokenURL : "https://login.live.com/oauth20_token.srf" ,
16
16
}
17
17
18
- // AzureActiveDirectoryEndpoint returns a new oauth2.Endpoint for the given tenant at Azure Active Directory.
18
+ // AzureADEndpoint returns a new oauth2.Endpoint for the given tenant at Azure Active Directory.
19
+ // If tenant is empty, it uses the tenant called `common`.
19
20
//
20
21
// For more information see:
21
22
// https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-v2-protocols#endpoints
22
- func AzureActiveDirectoryEndpoint (tenant string ) oauth2.Endpoint {
23
+ func AzureADEndpoint (tenant string ) oauth2.Endpoint {
24
+ if tenant == "" {
25
+ tenant = "common"
26
+ }
23
27
return oauth2.Endpoint {
24
28
AuthURL : "https://login.microsoftonline.com/" + tenant + "/oauth2/v2.0/authorize" ,
25
29
TokenURL : "https://login.microsoftonline.com/" + tenant + "/oauth2/v2.0/token" ,
You can’t perform that action at this time.
0 commit comments