...
1
2
3
4
5
6 package microsoft
7
8 import (
9 "golang.org/x/oauth2"
10 )
11
12
13 var LiveConnectEndpoint = oauth2.Endpoint{
14 AuthURL: "https://login.live.com/oauth20_authorize.srf",
15 TokenURL: "https://login.live.com/oauth20_token.srf",
16 }
17
18
19
20
21
22
23 func AzureADEndpoint(tenant string) oauth2.Endpoint {
24 if tenant == "" {
25 tenant = "common"
26 }
27 return oauth2.Endpoint{
28 AuthURL: "https://login.microsoftonline.com/" + tenant + "/oauth2/v2.0/authorize",
29 TokenURL: "https://login.microsoftonline.com/" + tenant + "/oauth2/v2.0/token",
30 DeviceAuthURL: "https://login.microsoftonline.com/" + tenant + "/oauth2/v2.0/devicecode",
31 }
32 }
33
View as plain text