Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CredentialsProvider ¶
type CredentialsProvider interface {
// SetHeaders sets the necessary headers on the request.
SetHeaders(r *http.Request) error
}
CredentialsProvider is an interface for providing credentials to the client. Implementations of this interface should set the necessary headers on the request.
func NewCredentialsProvider ¶
func NewCredentialsProvider(visitor func(r *http.Request) error) CredentialsProvider
type OAuthCredentialsProvider ¶
type OAuthCredentialsProvider interface {
CredentialsProvider
// Token returns the OAuth token generated by the provider.
Token() (*oauth2.Token, error)
}
OAuthCredentialsProvider is a specialized CredentialsProvider uses and provides an OAuth token.
type OAuthToken ¶
type OAuthToken struct {
// The access token issued by the authorization server. This is the token that will be used to authenticate requests.
AccessToken string `json:"access_token" auth:",sensitive"`
// Time in seconds until the token expires.
ExpiresIn int `json:"expires_in"`
// The scope of the token. This is a space-separated list of strings that represent the permissions granted by the token.
Scope string `json:"scope"`
// The type of token that was issued.
TokenType string `json:"token_type"`
}
OAuthToken represents an OAuth token as defined by the OAuth 2.0 Authorization Framework. https://datatracker.ietf.org/doc/html/rfc6749
Click to show internal directories.
Click to hide internal directories.