Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrTokenExpired = errors.New("access token has expired")
ErrTokenExpired indicates that the access token has expired and cannot be refreshed
Functions ¶
func RetrieveAuthEndpoints ¶ added in v1.11.11
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is used to make http requests including bearer token automatically and refreshing it if necessary
func NewClient ¶
NewClient builds configured HTTP client.
If token is provided will try to refresh the token if it has expired, otherwise if token is not provided will do client_credentials flow and fetch token
type DoRequestFunc ¶
DoRequestFunc is an alias for any function that takes an http request and returns a response and error
type MTLSEndpointAliases ¶ added in v1.11.11
type OpenIDStrategy ¶
type OpenIDStrategy struct {
// contains filtered or unexported fields
}
OpenIDStrategy implementation of OpenID strategy
func NewOpenIDStrategy ¶
NewOpenIDStrategy returns OpenId auth strategy
func (*OpenIDStrategy) ClientCredentials ¶ added in v1.5.0
func (s *OpenIDStrategy) ClientCredentials() (*auth.Token, error)
ClientCredentials is used to perform client credentials grant type flow
func (*OpenIDStrategy) PasswordCredentials ¶ added in v1.5.0
func (s *OpenIDStrategy) PasswordCredentials(user, password string) (*auth.Token, error)
PasswordCredentials is used to perform password grant type flow