stackoverflow: add stackoverflow oauth2 endpoints.

Fixes #297

Stackoverflow oauth2 endpoints constant added.
Ref: https://api.stackexchange.com/docs/authentication

Change-Id: I8285a9baa9514c79e8325c40434f62aa1ed4939b
GitHub-Last-Rev: 909997b81e
GitHub-Pull-Request: golang/oauth2#298
Reviewed-on: https://go-review.googlesource.com/119995
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Manigandan Dharmalingam 2018-06-20 17:47:24 +00:00 committed by Brad Fitzpatrick
parent 088f8e1d43
commit ef147856a6
2 changed files with 17 additions and 0 deletions

View File

@ -129,6 +129,7 @@ var brokenAuthHeaderProviders = []string{
"https://log.finalsurge.com/oauth/token", "https://log.finalsurge.com/oauth/token",
"https://multisport.todaysplan.com.au/rest/oauth/access_token", "https://multisport.todaysplan.com.au/rest/oauth/access_token",
"https://whats.todaysplan.com.au/rest/oauth/access_token", "https://whats.todaysplan.com.au/rest/oauth/access_token",
"https://stackoverflow.com/oauth/access_token",
} }
// brokenAuthHeaderDomains lists broken providers that issue dynamic endpoints. // brokenAuthHeaderDomains lists broken providers that issue dynamic endpoints.

View File

@ -0,0 +1,16 @@
// Copyright 2018 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 stackoverflow provides constants for using OAuth2 to access Stack Overflow.
package stackoverflow // import "golang.org/x/oauth2/stackoverflow"
import (
"golang.org/x/oauth2"
)
// Endpoint is Stack Overflow's OAuth 2.0 endpoint.
var Endpoint = oauth2.Endpoint{
AuthURL: "https://stackoverflow.com/oauth",
TokenURL: "https://stackoverflow.com/oauth/access_token",
}