Skip to content

Commit 6a2004c

Browse files
rumyantsevabradfitz
authored andcommitted
microsoft: add azure active directory endpoint
Relevant Azure AD API documentation is here: https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-v2-protocols#endpoints Fixes golang#257 Change-Id: Ia4fb136bbaa9d4445cd098f354070f16ace3b24b Reviewed-on: https://go-review.googlesource.com/82315 Reviewed-by: Brad Fitzpatrick <[email protected]>
1 parent ea8c673 commit 6a2004c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

microsoft/microsoft.go

+11
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,14 @@ var LiveConnectEndpoint = oauth2.Endpoint{
1414
AuthURL: "https://login.live.com/oauth20_authorize.srf",
1515
TokenURL: "https://login.live.com/oauth20_token.srf",
1616
}
17+
18+
// AzureActiveDirectoryEndpoint returns a new oauth2.Endpoint for the given tenant at Azure Active Directory.
19+
//
20+
// For more information see:
21+
// https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-v2-protocols#endpoints
22+
func AzureActiveDirectoryEndpoint(tenant string) oauth2.Endpoint {
23+
return oauth2.Endpoint{
24+
AuthURL: "https://login.microsoftonline.com/" + tenant + "/oauth2/v2.0/authorize",
25+
TokenURL: "https://login.microsoftonline.com/" + tenant + "/oauth2/v2.0/token",
26+
}
27+
}

0 commit comments

Comments
 (0)