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 ¶
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 ¶
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 ¶
func (s *OpenIDStrategy) ClientCredentials() (*auth.Token, error)
ClientCredentials is used to perform client credentials grant type flow
func (*OpenIDStrategy) PasswordCredentials ¶
func (s *OpenIDStrategy) PasswordCredentials(user, password string) (*auth.Token, error)
PasswordCredentials is used to perform password grant type flow