Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CallOption ¶ added in v1.0.7
type CallOption func(*goCloakSession) error
CallOption configures a Session
func RequestSkipperCallOption ¶ added in v1.0.7
func RequestSkipperCallOption(requestSkipper RequestSkipper) CallOption
RequestSkipperCallOption appends a RequestSkipper to the skipConditions
type GoCloakSession ¶
type GoCloakSession interface { // GetKeycloakAuthToken returns a JWT object, containing the AccessToken and more GetKeycloakAuthToken() (*gocloak.JWT, error) // AddAuthTokenToRequest sets the Authentication Header for the response AddAuthTokenToRequest(*resty.Client, *resty.Request) error // GetGoCloakInstance returns the currently used GoCloak instance. GetGoCloakInstance() *gocloak.GoCloak // ForceRefresh returns the currently used GoCloak instance. ForceRefresh() error }
GoCloakSession holds all callable methods
func NewSession ¶
func NewSession(clientID, clientSecret, realm, uri string, calloptions ...CallOption) (GoCloakSession, error)
NewSession returns a new instance of a gocloak Session
type RequestSkipper ¶ added in v1.0.7
type RequestSkipper func(*resty.Request) bool
RequestSkipper is a function signature that can be used to skip a certain request if needed.
func SubstringRequestSkipper ¶ added in v1.0.7
func SubstringRequestSkipper(substr string) RequestSkipper
SubstringRequestSkipper is a RequestSkipper that skips a request when the url in the request contains a certain substring
Click to show internal directories.
Click to hide internal directories.