mirror of
https://github.com/cubixle/ebay.git
synced 2026-04-24 23:04:46 +01:00
OAuth 2.0 endpoints
This commit is contained in:
12
oauth2.go
12
oauth2.go
@@ -2,6 +2,18 @@ package ebay
|
|||||||
|
|
||||||
import "golang.org/x/oauth2"
|
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'.
|
// 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
|
// 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.
|
// it must be set to 'Bearer' for subsequent requests.
|
||||||
|
|||||||
Reference in New Issue
Block a user