Documentation
¶
Overview ¶
Package createoauthtoken exchanges an OAuth authorization code for a new connection: a token of kind oauth.
Index ¶
Constants ¶
const ( // AccessLifetime is how long an access token works: the client refreshes it after. AccessLifetime = time.Hour // RefreshLifetime is how long a connection lasts without use: each refresh starts it again. RefreshLifetime = 90 * 24 * time.Hour )
Variables ¶
var ErrInvalidGrant = domain.Invalid("the code or refresh token is unknown, expired, already used, or of another client")
ErrInvalidGrant is the OAuth error invalid_grant: a code or refresh token unknown, expired, used, or of another client.
Functions ¶
Types ¶
type Input ¶
type Input struct {
Code string
ClientID string
ClientName string // the name of the connection in the list of tokens
RedirectURI string
CodeVerifier string
}
Input is the exchange of an authorization code (grant_type=authorization_code).