Skip to content

Commit

Permalink
stackoverflow: add stackoverflow oauth2 endpoints.
Browse files Browse the repository at this point in the history
Fixes #297

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

Change-Id: I8285a9baa9514c79e8325c40434f62aa1ed4939b
GitHub-Last-Rev: 909997b
GitHub-Pull-Request: #298
Reviewed-on: https://go-review.googlesource.com/119995
Reviewed-by: Brad Fitzpatrick <[email protected]>
  • Loading branch information
manigandand authored and bradfitz committed Jun 20, 2018
1 parent 088f8e1 commit ef14785
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions internal/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ var brokenAuthHeaderProviders = []string{
"https://log.finalsurge.com/oauth/token",
"https://multisport.todaysplan.com.au/rest/oauth/access_token",
"https://whats.todaysplan.com.au/rest/oauth/access_token",
"https://stackoverflow.com/oauth/access_token",

This comment has been minimized.

Copy link
@BETHswal

BETHswal Mar 20, 2023

😎

}

// brokenAuthHeaderDomains lists broken providers that issue dynamic endpoints.
Expand Down
16 changes: 16 additions & 0 deletions stackoverflow/stackoverflow.go
Original file line number Diff line number Diff line change
@@ -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",
}

0 comments on commit ef14785

Please sign in to comment.