Table of Contents

Class EncryptionClient

Namespace
Auth0.ManagementApi.Keys
Assembly
Auth0.ManagementApi.dll
public class EncryptionClient : IEncryptionClient
Inheritance
EncryptionClient
Implements
Inherited Members
Extension Methods

Methods

CreateAsync(CreateEncryptionKeyRequestContent, RequestOptions?, CancellationToken)

Create the new, pre-activated encryption key, without the key material.

public WithRawResponseTask<CreateEncryptionKeyResponseContent> CreateAsync(CreateEncryptionKeyRequestContent request, RequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

request CreateEncryptionKeyRequestContent
options RequestOptions
cancellationToken CancellationToken

Returns

WithRawResponseTask<CreateEncryptionKeyResponseContent>

Examples

await client.Keys.Encryption.CreateAsync(
    new CreateEncryptionKeyRequestContent { Type = CreateEncryptionKeyType.CustomerProvidedRootKey }
);

CreatePublicWrappingKeyAsync(string, RequestOptions?, CancellationToken)

Create the public wrapping key to wrap your own encryption key material.

public WithRawResponseTask<CreateEncryptionKeyPublicWrappingResponseContent> CreatePublicWrappingKeyAsync(string kid, RequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

kid string
options RequestOptions
cancellationToken CancellationToken

Returns

WithRawResponseTask<CreateEncryptionKeyPublicWrappingResponseContent>

Examples

await client.Keys.Encryption.CreatePublicWrappingKeyAsync("kid");

DeleteAsync(string, RequestOptions?, CancellationToken)

Delete the custom provided encryption key with the given ID and move back to using native encryption key.

public Task DeleteAsync(string kid, RequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

kid string
options RequestOptions
cancellationToken CancellationToken

Returns

Task

Examples

await client.Keys.Encryption.DeleteAsync("kid");

GetAsync(string, RequestOptions?, CancellationToken)

Retrieve details of the encryption key with the given ID.

public WithRawResponseTask<GetEncryptionKeyResponseContent> GetAsync(string kid, RequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

kid string
options RequestOptions
cancellationToken CancellationToken

Returns

WithRawResponseTask<GetEncryptionKeyResponseContent>

Examples

await client.Keys.Encryption.GetAsync("kid");

ImportAsync(string, ImportEncryptionKeyRequestContent, RequestOptions?, CancellationToken)

Import wrapped key material and activate encryption key.

public WithRawResponseTask<ImportEncryptionKeyResponseContent> ImportAsync(string kid, ImportEncryptionKeyRequestContent request, RequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

kid string
request ImportEncryptionKeyRequestContent
options RequestOptions
cancellationToken CancellationToken

Returns

WithRawResponseTask<ImportEncryptionKeyResponseContent>

Examples

await client.Keys.Encryption.ImportAsync(
    "kid",
    new ImportEncryptionKeyRequestContent { WrappedKey = "wrapped_key" }
);

ListAsync(ListEncryptionKeysRequestParameters, RequestOptions?, CancellationToken)

Retrieve details of all the encryption keys associated with your tenant.

public Task<Pager<EncryptionKey>> ListAsync(ListEncryptionKeysRequestParameters request, RequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

request ListEncryptionKeysRequestParameters
options RequestOptions
cancellationToken CancellationToken

Returns

Task<Pager<EncryptionKey>>

Examples

await client.Keys.Encryption.ListAsync(
    new ListEncryptionKeysRequestParameters
    {
        Page = 1,
        PerPage = 1,
        IncludeTotals = true,
    }
);

RekeyAsync(RequestOptions?, CancellationToken)

Perform rekeying operation on the key hierarchy.

public Task RekeyAsync(RequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

options RequestOptions
cancellationToken CancellationToken

Returns

Task

Examples

await client.Keys.Encryption.RekeyAsync();