Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrRequestFailed = errors.New("HTTP request failed") ErrNoAccessToken = errors.New("no access token in response") )
Functions ¶
This section is empty.
Types ¶
type GetServiceTokenOption ¶
type GetServiceTokenOption func(*GetServiceTokenOptions)
func WithCustomerID ¶
func WithCustomerID(customerID string) GetServiceTokenOption
func WithTenantID ¶
func WithTenantID(tenantID string) GetServiceTokenOption
type GetServiceTokenOptions ¶
type KeycloakError ¶
type TokenClient ¶
type TokenClient struct {
// contains filtered or unexported fields
}
func NewTokenClient ¶
func NewTokenClient(url, clientID, clientSecret string, opts ...TokenClienttOption) *TokenClient
func (*TokenClient) GetServiceToken ¶
func (client *TokenClient) GetServiceToken(ctx context.Context, opts ...GetServiceTokenOption) (string, error)
type TokenClienttOption ¶
type TokenClienttOption func(*TokenClient)
func WithRestyClient ¶
func WithRestyClient(restyClient *resty.Client) TokenClienttOption
func WithTimeout ¶
func WithTimeout(timeout time.Duration) TokenClienttOption
Click to show internal directories.
Click to hide internal directories.