From 6fb68652e00bf306afe487203113e417a34d85f6 Mon Sep 17 00:00:00 2001 From: JBP <2850825+jybp@users.noreply.github.com> Date: Sat, 17 Aug 2019 18:59:50 +0200 Subject: [PATCH] OAuth 2.0 endpoints --- oauth2.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/oauth2.go b/oauth2.go index 0ee357a..9954b1e 100644 --- a/oauth2.go +++ b/oauth2.go @@ -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.