Versions in this module Expand all Collapse all v1 v1.7.0 Oct 31, 2022 v1.6.9 Oct 23, 2022 Changes in this version + var ErrNoToken = errors.New("authorization server did not include a token in the response") + type AuthenticationScheme byte + const BasicAuth + const BearerAuth + const DigestAuth + type Challenge struct + Parameters map[string]string + Scheme AuthenticationScheme + func ParseAuthHeader(header http.Header) []Challenge + type FetchTokenResponse struct + AccessToken string + ExpiresIn int + IssuedAt time.Time + RefreshToken string + Token string + func FetchToken(ctx context.Context, client *http.Client, headers http.Header, to TokenOptions) (*FetchTokenResponse, error) + type OAuthTokenResponse struct + AccessToken string + ExpiresIn int + IssuedAt time.Time + RefreshToken string + Scope string + func FetchTokenWithOAuth(ctx context.Context, client *http.Client, headers http.Header, clientID string, ...) (*OAuthTokenResponse, error) + type TokenOptions struct + FetchRefreshToken bool + Realm string + Scopes []string + Secret string + Service string + Username string + func GenerateTokenOptions(ctx context.Context, host, username, secret string, c Challenge) (TokenOptions, error)