From 26761bd3e77e5841d8c0f65f44e41746b9723402 Mon Sep 17 00:00:00 2001 From: Kevin Lyda Date: Wed, 30 May 2018 13:38:18 +0100 Subject: [PATCH] Update the Microsoft Oauth2 lib. --- vendor/golang.org/x/oauth2/LICENSE | 2 +- vendor/golang.org/x/oauth2/microsoft/microsoft.go | 15 +++++++++++++++ vendor/vendor.json | 6 +++--- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/vendor/golang.org/x/oauth2/LICENSE b/vendor/golang.org/x/oauth2/LICENSE index d02f24fd..6a66aea5 100644 --- a/vendor/golang.org/x/oauth2/LICENSE +++ b/vendor/golang.org/x/oauth2/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2009 The oauth2 Authors. All rights reserved. +Copyright (c) 2009 The Go Authors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are diff --git a/vendor/golang.org/x/oauth2/microsoft/microsoft.go b/vendor/golang.org/x/oauth2/microsoft/microsoft.go index f21b3985..3ffbc57a 100644 --- a/vendor/golang.org/x/oauth2/microsoft/microsoft.go +++ b/vendor/golang.org/x/oauth2/microsoft/microsoft.go @@ -14,3 +14,18 @@ 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", + } +} diff --git a/vendor/vendor.json b/vendor/vendor.json index 0686f7ec..33c0eab0 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -879,10 +879,10 @@ "revisionTime": "2017-09-28T00:25:42Z" }, { - "checksumSHA1": "aoeqnmNuZdqxHG0/8bhKNLfRaY4=", + "checksumSHA1": "91mzAbqHQ6AAK65DzB4IkLOcvtk=", "path": "golang.org/x/oauth2/microsoft", - "revision": "b9780ec78894ab900c062d58ee3076cd9b2a4501", - "revisionTime": "2017-02-14T22:24:16Z" + "revision": "ec22f46f877b4505e0117eeaab541714644fdd28", + "revisionTime": "2018-05-28T20:23:04Z" }, { "checksumSHA1": "FUo16zuO20jOcdCUu0IgiF51koE=", -- GitLab