devicecredentials

package
v3.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 9, 2026 License: MIT Imports: 8 Imported by: 0

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

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

func (c *Client) Delete(
	ctx context.Context,

	id string,
	opts ...option.RequestOption,
) error

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

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) Delete

func (r *RawClient) Delete(
	ctx context.Context,

	id string,
	opts ...option.RequestOption,
) (*core.Response[any], error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL