Class KeysClient
- Namespace
- Auth0.ManagementApi.Clients
- Assembly
- Auth0.ManagementApi.dll
Contains methods to access the /keys endpoints.
public class KeysClient : BaseClient, IKeysClient
- Inheritance
-
KeysClient
- Implements
- Inherited Members
Constructors
KeysClient(IManagementConnection, Uri, IDictionary<string, string>)
Initializes a new instance of the KeysClient class.
public KeysClient(IManagementConnection connection, Uri baseUri, IDictionary<string, string> defaultHeaders)
Parameters
connectionIManagementConnectionIManagementConnection used to make all API calls.
baseUriUriUri of the endpoint to use in making API calls.
defaultHeadersIDictionary<string, string>Dictionary containing default headers included with every request this client makes.
Methods
CreateEncryptionKeyAsync(EncryptionKeyCreateRequest, CancellationToken)
Create the new, pre-activated encryption key, without the key material.
public Task<EncryptionKey> CreateEncryptionKeyAsync(EncryptionKeyCreateRequest request, CancellationToken cancellationToken = default)
Parameters
requestEncryptionKeyCreateRequestcancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
- Task<EncryptionKey>
Newly created pre-activated encryption key EncryptionKey.
CreatePublicWrappingKeyAsync(WrappingKeyCreateRequest, CancellationToken)
Create the public wrapping key to wrap your own encryption key material.
public Task<WrappingKey> CreatePublicWrappingKeyAsync(WrappingKeyCreateRequest request, CancellationToken cancellationToken = default)
Parameters
requestWrappingKeyCreateRequestcancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
DeleteEncryptionKeyAsync(string, CancellationToken)
Delete the custom provided encryption key with the given ID and move back to using native encryption key.
public Task DeleteEncryptionKeyAsync(string kid, CancellationToken cancellationToken = default)
Parameters
kidstringEncryption key ID
cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
GetAllAsync(CancellationToken)
Get all Application Signing Keys
public Task<IList<Key>> GetAllAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
GetAllEncryptionKeysAsync(PaginationInfo, CancellationToken)
Retrieve details of all the encryption keys associated with your tenant.
public Task<IPagedList<EncryptionKey>> GetAllEncryptionKeysAsync(PaginationInfo pagination, CancellationToken cancellationToken = default)
Parameters
paginationPaginationInfocancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
- Task<IPagedList<EncryptionKey>>
Retrieve details of all the encryption keys associated with your tenant. EncryptionKey.
GetAsync(string, CancellationToken)
Get an Application Signing Key by its key ID.
public Task<Key> GetAsync(string kid, CancellationToken cancellationToken = default)
Parameters
kidstringThe ID of the key to retrieve.
cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
GetEncryptionKeyAsync(EncryptionKeyGetRequest, CancellationToken)
Retrieve details of the encryption key with the given ID.
public Task<EncryptionKey> GetEncryptionKeyAsync(EncryptionKeyGetRequest request, CancellationToken cancellationToken = default)
Parameters
requestEncryptionKeyGetRequestcancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
- Task<EncryptionKey>
Retrieve details of the encryption key associated with the id. EncryptionKey.
ImportEncryptionKeyAsync(EncryptionKeyImportRequest, CancellationToken)
Import wrapped key material and activate encryption key.
public Task<EncryptionKey> ImportEncryptionKeyAsync(EncryptionKeyImportRequest request, CancellationToken cancellationToken = default)
Parameters
requestEncryptionKeyImportRequestcancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
RekeyAsync(CancellationToken)
Perform rekeying operation on the key hierarchy.
public Task RekeyAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
RevokeSigningKeyAsync(string, CancellationToken)
Revoke an Application Signing Key by its key ID.
public Task<RevokeSigningKeyResponse> RevokeSigningKeyAsync(string kid, CancellationToken cancellationToken = default)
Parameters
kidstringThe ID of the key to revoke.
cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
- Task<RevokeSigningKeyResponse>
The revoked key's cert and kid.
RotateSigningKeyAsync(CancellationToken)
Rotate the Application Signing Key.
public Task<RotateSigningKeyResponse> RotateSigningKeyAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
- Task<RotateSigningKeyResponse>
The next rotated key's cert and kid.