Documentation
¶
Index ¶
- type Client
- func (c *Client) Create(ctx context.Context, clientID string, ...) (*management.PostClientCredentialResponseContent, error)
- func (c *Client) Delete(ctx context.Context, clientID string, credentialID string, ...) error
- func (c *Client) Get(ctx context.Context, clientID string, credentialID string, ...) (*management.GetClientCredentialResponseContent, error)
- func (c *Client) List(ctx context.Context, clientID string, opts ...option.RequestOption) ([]*management.ClientCredential, error)
- func (c *Client) Update(ctx context.Context, clientID string, credentialID string, ...) (*management.PatchClientCredentialResponseContent, error)
- type RawClient
- func (r *RawClient) Create(ctx context.Context, clientID string, ...) (*core.Response[*management.PostClientCredentialResponseContent], error)
- func (r *RawClient) Delete(ctx context.Context, clientID string, credentialID string, ...) (*core.Response[any], error)
- func (r *RawClient) Get(ctx context.Context, clientID string, credentialID string, ...) (*core.Response[*management.GetClientCredentialResponseContent], error)
- func (r *RawClient) List(ctx context.Context, clientID string, opts ...option.RequestOption) (*core.Response[[]*management.ClientCredential], error)
- func (r *RawClient) Update(ctx context.Context, clientID string, credentialID string, ...) (*core.Response[*management.PatchClientCredentialResponseContent], error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
WithRawResponse *RawClient
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(options *core.RequestOptions) *Client
func (*Client) Create ¶
func (c *Client) Create( ctx context.Context, clientID string, request *management.PostClientCredentialRequestContent, opts ...option.RequestOption, ) (*management.PostClientCredentialResponseContent, error)
Create a client credential associated to your application. Credentials can be used to configure Private Key JWT and mTLS authentication methods, as well as for JWT-secured Authorization requests.
<h5>Public Key</h5>Public Key credentials can be used to set up Private Key JWT client authentication and JWT-secured Authorization requests.
Sample: <pre><code>{
"credential_type": "public_key",
"name": "string",
"pem": "string",
"alg": "RS256",
"parse_expiry_from_cert": false,
"expires_at": "2022-12-31T23:59:59Z"
}</code></pre>
<h5>Certificate (CA-signed & self-signed)</h5>Certificate credentials can be used to set up mTLS client authentication. CA-signed certificates can be configured either with a signed certificate or with just the certificate Subject DN.
CA-signed Certificate Sample (pem): <pre><code>{
"credential_type": "x509_cert",
"name": "string",
"pem": "string"
}</code></pre>CA-signed Certificate Sample (subject_dn): <pre><code>{
"credential_type": "cert_subject_dn",
"name": "string",
"subject_dn": "string"
}</code></pre>Self-signed Certificate Sample: <pre><code>{
"credential_type": "cert_subject_dn",
"name": "string",
"pem": "string"
}</code></pre>
The credential will be created but not yet enabled for use until you set the corresponding properties in the client: <ul>
<li>To enable the credential for Private Key JWT or mTLS authentication methods, set the <code>client_authentication_methods</code> property on the client. For more information, read <a href="https://auth0.com/docs/get-started/applications/configure-private-key-jwt">Configure Private Key JWT Authentication</a> and <a href="https://auth0.com/docs/get-started/applications/configure-mtls">Configure mTLS Authentication</a></li> <li>To enable the credential for JWT-secured Authorization requests, set the <code>signed_request_object</code>property on the client. For more information, read <a href="https://auth0.com/docs/get-started/applications/configure-jar">Configure JWT-secured Authorization Requests (JAR)</a></li>
</ul>
func (*Client) Delete ¶
func (c *Client) Delete( ctx context.Context, clientID string, credentialID string, opts ...option.RequestOption, ) error
Delete a client credential you previously created. May be enabled or disabled. For more information, read <a href="https://www.auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow">Client Credential Flow</a>.
func (*Client) Get ¶
func (c *Client) Get( ctx context.Context, clientID string, credentialID string, opts ...option.RequestOption, ) (*management.GetClientCredentialResponseContent, error)
Get the details of a client credential.
<b>Important</b>: To enable credentials to be used for a client authentication method, set the <code>client_authentication_methods</code> property on the client. To enable credentials to be used for JWT-Secured Authorization requests set the <code>signed_request_object</code> property on the client.
func (*Client) List ¶
func (c *Client) List( ctx context.Context, clientID string, opts ...option.RequestOption, ) ([]*management.ClientCredential, error)
Get the details of a client credential.
<b>Important</b>: To enable credentials to be used for a client authentication method, set the <code>client_authentication_methods</code> property on the client. To enable credentials to be used for JWT-Secured Authorization requests set the <code>signed_request_object</code> property on the client.
func (*Client) Update ¶
func (c *Client) Update( ctx context.Context, clientID string, credentialID string, request *management.PatchClientCredentialRequestContent, opts ...option.RequestOption, ) (*management.PatchClientCredentialResponseContent, error)
Change a client credential you previously created. May be enabled or disabled. For more information, read <a href="https://www.auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow">Client Credential Flow</a>.
type RawClient ¶
type RawClient struct {
// contains filtered or unexported fields
}
func NewRawClient ¶
func NewRawClient(options *core.RequestOptions) *RawClient
func (*RawClient) Create ¶
func (r *RawClient) Create( ctx context.Context, clientID string, request *management.PostClientCredentialRequestContent, opts ...option.RequestOption, ) (*core.Response[*management.PostClientCredentialResponseContent], error)
func (*RawClient) Get ¶
func (r *RawClient) Get( ctx context.Context, clientID string, credentialID string, opts ...option.RequestOption, ) (*core.Response[*management.GetClientCredentialResponseContent], error)
func (*RawClient) List ¶
func (r *RawClient) List( ctx context.Context, clientID string, opts ...option.RequestOption, ) (*core.Response[[]*management.ClientCredential], error)
func (*RawClient) Update ¶
func (r *RawClient) Update( ctx context.Context, clientID string, credentialID string, request *management.PatchClientCredentialRequestContent, opts ...option.RequestOption, ) (*core.Response[*management.PatchClientCredentialResponseContent], error)