OAuth 2.0 endpoints

This commit is contained in:
JBP
2019-08-17 18:59:50 +02:00
parent 61a3ca60f7
commit 6fb68652e0

View File

@@ -2,6 +2,18 @@ package ebay
import "golang.org/x/oauth2"
// eBay OAuth 2.0 endpoints.
var (
OAuth20Endpoint = oauth2.Endpoint{
AuthURL: "https://auth.ebay.com/oauth2/authorize",
TokenURL: "https://api.ebay.com/identity/v1/oauth2/token",
}
OAuth20SandboxEndpoint = oauth2.Endpoint{
AuthURL: "https://auth.sandbox.ebay.com/oauth2/authorize",
TokenURL: "https://api.sandbox.ebay.com/identity/v1/oauth2/token",
}
)
// BearerTokenSource forces the type of the token returned by the 'base' TokenSource to 'Bearer'.
// The eBay API will return "Application Access Token" or "User Access Token" as token_type but
// it must be set to 'Bearer' for subsequent requests.