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
requestCreateEncryptionKeyRequestContentoptionsRequestOptionscancellationTokenCancellationToken
Returns
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
kidstringoptionsRequestOptionscancellationTokenCancellationToken
Returns
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
kidstringoptionsRequestOptionscancellationTokenCancellationToken
Returns
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
kidstringoptionsRequestOptionscancellationTokenCancellationToken
Returns
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
kidstringrequestImportEncryptionKeyRequestContentoptionsRequestOptionscancellationTokenCancellationToken
Returns
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
requestListEncryptionKeysRequestParametersoptionsRequestOptionscancellationTokenCancellationToken
Returns
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
optionsRequestOptionscancellationTokenCancellationToken
Returns
Examples
await client.Keys.Encryption.RekeyAsync();