diff options
author | Wim <wim@42.be> | 2019-12-26 23:12:28 +0100 |
---|---|---|
committer | Wim <wim@42.be> | 2020-03-01 22:19:33 +0100 |
commit | 795a8705c3fdc5bf55e83d382e7d3ff233896a0b (patch) | |
tree | 46ac43e487102de7ea21a823a7a7902ae9493f88 /vendor/golang.org/x/oauth2/microsoft/microsoft.go | |
parent | 3af0dc3b3a5bfaffe37770c437427f1e99402405 (diff) | |
download | matterbridge-msglm-795a8705c3fdc5bf55e83d382e7d3ff233896a0b.tar.gz matterbridge-msglm-795a8705c3fdc5bf55e83d382e7d3ff233896a0b.tar.bz2 matterbridge-msglm-795a8705c3fdc5bf55e83d382e7d3ff233896a0b.zip |
Add initial Microsoft Teams support
Documentation on https://github.com/42wim/matterbridge/wiki/MS-Teams-setup
Diffstat (limited to 'vendor/golang.org/x/oauth2/microsoft/microsoft.go')
-rw-r--r-- | vendor/golang.org/x/oauth2/microsoft/microsoft.go | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/vendor/golang.org/x/oauth2/microsoft/microsoft.go b/vendor/golang.org/x/oauth2/microsoft/microsoft.go new file mode 100644 index 00000000..3ffbc57a --- /dev/null +++ b/vendor/golang.org/x/oauth2/microsoft/microsoft.go @@ -0,0 +1,31 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package microsoft provides constants for using OAuth2 to access Windows Live ID. +package microsoft // import "golang.org/x/oauth2/microsoft" + +import ( + "golang.org/x/oauth2" +) + +// LiveConnectEndpoint is Windows's Live ID OAuth 2.0 endpoint. +var LiveConnectEndpoint = oauth2.Endpoint{ + AuthURL: "https://login.live.com/oauth20_authorize.srf", + TokenURL: "https://login.live.com/oauth20_token.srf", +} + +// AzureADEndpoint returns a new oauth2.Endpoint for the given tenant at Azure Active Directory. +// If tenant is empty, it uses the tenant called `common`. +// +// For more information see: +// https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-v2-protocols#endpoints +func AzureADEndpoint(tenant string) oauth2.Endpoint { + if tenant == "" { + tenant = "common" + } + return oauth2.Endpoint{ + AuthURL: "https://login.microsoftonline.com/" + tenant + "/oauth2/v2.0/authorize", + TokenURL: "https://login.microsoftonline.com/" + tenant + "/oauth2/v2.0/token", + } +} |