forked from Mirrors/oauth2
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 #257 Change-Id: Ia4fb136bbaa9d4445cd098f354070f16ace3b24b Reviewed-on: https://go-review.googlesource.com/82315 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
ea8c6730ed
commit
6a2004c890
|
@ -14,3 +14,14 @@ var LiveConnectEndpoint = oauth2.Endpoint{
|
|||
AuthURL: "https://login.live.com/oauth20_authorize.srf",
|
||||
TokenURL: "https://login.live.com/oauth20_token.srf",
|
||||
}
|
||||
|
||||
// AzureActiveDirectoryEndpoint returns a new oauth2.Endpoint for the given tenant at Azure Active Directory.
|
||||
//
|
||||
// For more information see:
|
||||
// https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-v2-protocols#endpoints
|
||||
func AzureActiveDirectoryEndpoint(tenant string) oauth2.Endpoint {
|
||||
return oauth2.Endpoint{
|
||||
AuthURL: "https://login.microsoftonline.com/" + tenant + "/oauth2/v2.0/authorize",
|
||||
TokenURL: "https://login.microsoftonline.com/" + tenant + "/oauth2/v2.0/token",
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue