Documentation
¶
Index ¶
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) CreatePublicKey ¶
func (c *Client) CreatePublicKey( ctx context.Context, request *management.CreatePublicKeyDeviceCredentialRequestContent, opts ...option.RequestOption, ) (*management.CreatePublicKeyDeviceCredentialResponseContent, error)
Create a device credential public key to manage refresh token rotation for a given `user_id`. Device Credentials APIs are designed for ad-hoc administrative use only and paging is by default enabled for GET requests.
When refresh token rotation is enabled, the endpoint becomes consistent. For more information, read [Signing Keys](https://auth0.com/docs/get-started/tenant-settings/signing-keys).
Example:
request := &management.CreatePublicKeyDeviceCredentialRequestContent{
DeviceName: "device_name",
Type: management.DeviceCredentialPublicKeyTypeEnumPublicKey,
Value: "value",
DeviceID: "device_id",
}
client.DeviceCredentials.CreatePublicKey(
context.TODO(),
request,
)
func (*Client) Delete ¶
Permanently delete a device credential (such as a refresh token or public key) with the given ID.
Example:
client.DeviceCredentials.Delete(
context.TODO(),
"id",
)
func (*Client) List ¶
func (c *Client) List( ctx context.Context, request *management.ListDeviceCredentialsRequestParameters, opts ...option.RequestOption, ) (*core.Page[*int, *management.DeviceCredential, *management.ListDeviceCredentialsOffsetPaginatedResponseContent], error)
Retrieve device credential information (`public_key`, `refresh_token`, or `rotating_refresh_token`) associated with a specific user.
Example:
request := &management.ListDeviceCredentialsRequestParameters{
Page: management.Int(
1,
),
PerPage: management.Int(
1,
),
IncludeTotals: management.Bool(
true,
),
Fields: management.String(
"fields",
),
IncludeFields: management.Bool(
true,
),
UserID: management.String(
"user_id",
),
ClientID: management.String(
"client_id",
),
Type: management.DeviceCredentialTypeEnumPublicKey.Ptr(),
}
client.DeviceCredentials.List(
context.TODO(),
request,
)
type RawClient ¶
type RawClient struct {
// contains filtered or unexported fields
}
func NewRawClient ¶
func NewRawClient(options *core.RequestOptions) *RawClient
func (*RawClient) CreatePublicKey ¶
func (r *RawClient) CreatePublicKey( ctx context.Context, request *management.CreatePublicKeyDeviceCredentialRequestContent, opts ...option.RequestOption, ) (*core.Response[*management.CreatePublicKeyDeviceCredentialResponseContent], error)