Skip to content

Commit ef14785

Browse files
manigandandbradfitz
authored andcommitted
stackoverflow: add stackoverflow oauth2 endpoints.
Fixes golang#297 Stackoverflow oauth2 endpoints constant added. Ref: https://api.stackexchange.com/docs/authentication Change-Id: I8285a9baa9514c79e8325c40434f62aa1ed4939b GitHub-Last-Rev: 909997b GitHub-Pull-Request: golang#298 Reviewed-on: https://go-review.googlesource.com/119995 Reviewed-by: Brad Fitzpatrick <[email protected]>
1 parent 088f8e1 commit ef14785

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

internal/token.go

+1
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ var brokenAuthHeaderProviders = []string{
129129
"https://log.finalsurge.com/oauth/token",
130130
"https://multisport.todaysplan.com.au/rest/oauth/access_token",
131131
"https://whats.todaysplan.com.au/rest/oauth/access_token",
132+
"https://stackoverflow.com/oauth/access_token",
132133
}
133134

134135
// brokenAuthHeaderDomains lists broken providers that issue dynamic endpoints.

stackoverflow/stackoverflow.go

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Copyright 2018 The Go Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style
3+
// license that can be found in the LICENSE file.
4+
5+
// Package stackoverflow provides constants for using OAuth2 to access Stack Overflow.
6+
package stackoverflow // import "golang.org/x/oauth2/stackoverflow"
7+
8+
import (
9+
"golang.org/x/oauth2"
10+
)
11+
12+
// Endpoint is Stack Overflow's OAuth 2.0 endpoint.
13+
var Endpoint = oauth2.Endpoint{
14+
AuthURL: "https://stackoverflow.com/oauth",
15+
TokenURL: "https://stackoverflow.com/oauth/access_token",
16+
}

0 commit comments

Comments
 (0)