Documentation
¶
Index ¶
- func WithAuth0ClientEnvEntry(key string, value string) *core.Auth0ClientEnvEntryOption
- func WithBaseURL(baseURL string) *core.BaseURLOption
- func WithBodyProperties(bodyProperties map[string]interface{}) *core.BodyPropertiesOption
- func WithClientCredentials(ctx context.Context, clientID, clientSecret string) *core.ClientCredentialsOption
- func WithClientCredentialsAndAudience(ctx context.Context, clientID, clientSecret, audience string) *core.ClientCredentialsAndAudienceOption
- func WithClientCredentialsPrivateKeyJwt(ctx context.Context, clientID string, privateKey string, algorithm string) *core.ClientCredentialsPrivateKeyJwtOption
- func WithClientCredentialsPrivateKeyJwtAndAudience(ctx context.Context, clientID string, privateKey string, ...) *core.ClientCredentialsPrivateKeyJwtAndAudienceOption
- func WithCustomDomainHeader(domain string) *core.CustomDomainHeaderOption
- func WithDebug(debug bool) *core.DebugOption
- func WithHTTPClient(httpClient core.HTTPClient) *core.HTTPClientOption
- func WithHTTPHeader(httpHeader http.Header) *core.HTTPHeaderOption
- func WithInsecure() *core.InsecureOption
- func WithMaxAttempts(attempts uint) *core.MaxAttemptsOption
- func WithNoAuth0ClientInfo() *core.NoAuth0ClientInfoOption
- func WithQueryParameters(queryParameters url.Values) *core.QueryParametersOption
- func WithToken(token string) *core.TokenOption
- func WithUserAgent(userAgent string) *core.UserAgentOption
- type RequestOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithAuth0ClientEnvEntry ¶
func WithAuth0ClientEnvEntry(key string, value string) *core.Auth0ClientEnvEntryOption
WithAuth0ClientEnvEntry allows adding extra environment keys to the client information.
func WithBaseURL ¶
func WithBaseURL(baseURL string) *core.BaseURLOption
WithBaseURL sets the base URL, overriding the default environment, if any.
func WithBodyProperties ¶
func WithBodyProperties(bodyProperties map[string]interface{}) *core.BodyPropertiesOption
WithBodyProperties adds the given body properties to the request.
func WithClientCredentials ¶
func WithClientCredentials(ctx context.Context, clientID, clientSecret string) *core.ClientCredentialsOption
func WithClientCredentialsAndAudience ¶
func WithClientCredentialsAndAudience(ctx context.Context, clientID, clientSecret, audience string) *core.ClientCredentialsAndAudienceOption
func WithClientCredentialsPrivateKeyJwt ¶
func WithClientCredentialsPrivateKeyJwt(ctx context.Context, clientID string, privateKey string, algorithm string) *core.ClientCredentialsPrivateKeyJwtOption
WithClientCredentialsPrivateKeyJwt sets client credentials using private key JWT.
func WithCustomDomainHeader ¶
func WithCustomDomainHeader(domain string) *core.CustomDomainHeaderOption
WithCustomDomainHeader sets the custom domain for the Management instance. The custom domain header is only sent for whitelisted API endpoints.
func WithDebug ¶
func WithDebug(debug bool) *core.DebugOption
WithDebug configures the HTTP client to enable debug logging of requests and responses.
func WithHTTPClient ¶
func WithHTTPClient(httpClient core.HTTPClient) *core.HTTPClientOption
WithHTTPClient uses the given HTTPClient to issue the request.
func WithHTTPHeader ¶
func WithHTTPHeader(httpHeader http.Header) *core.HTTPHeaderOption
WithHTTPHeader adds the given http.Header to the request.
func WithInsecure ¶
func WithInsecure() *core.InsecureOption
WithInsecure configures the client to allow HTTP instead of HTTPS and sets a static "insecure" token for testing.
This option is available for testing purposes and should not be used in production. Note: Users should pass the domain without a scheme (e.g., "localhost:8080").
func WithMaxAttempts ¶
func WithMaxAttempts(attempts uint) *core.MaxAttemptsOption
WithMaxAttempts configures the maximum number of retry attempts.
func WithNoAuth0ClientInfo ¶
func WithNoAuth0ClientInfo() *core.NoAuth0ClientInfoOption
WithNoAuth0ClientInfo configures the client to not send the "Auth0-Client" header at all.
func WithQueryParameters ¶
func WithQueryParameters(queryParameters url.Values) *core.QueryParametersOption
WithQueryParameters adds the given query parameters to the request.
func WithToken ¶
func WithToken(token string) *core.TokenOption
WithToken sets the 'Authorization: Bearer <token>' request header.
func WithUserAgent ¶
func WithUserAgent(userAgent string) *core.UserAgentOption
WithUserAgent configures the HTTP client to use a custom User-Agent header.
Types ¶
type RequestOption ¶
type RequestOption = core.RequestOption
RequestOption adapts the behavior of an individual request.