Interface UserApiKeyAuthProviderClient

  • All Known Implementing Classes:
    UserApiKeyAuthProviderClientImpl

    public interface UserApiKeyAuthProviderClient
    The user API key authentication provider client. This client is used to manage API keys.
    • Method Detail

      • createApiKey

        Task<UserApiKey> createApiKey​(@NonNull
                                      String name)
        Creates a user API key that can be used to authenticate as the current user.
        Parameters:
        name - The name of the API key to be created
        Returns:
        A Task that contains the created API key.
      • fetchApiKey

        Task<UserApiKey> fetchApiKey​(@NonNull
                                     ObjectId id)
        Fetches a user API key associated with the current user.
        Parameters:
        id - The id of the API key to fetch
        Returns:
        A Task that contains the fetched API key.
      • fetchApiKeys

        Task<List<UserApiKey>> fetchApiKeys()
        Fetches the user API keys associated with the current user.
        Returns:
        A Task that contains the list of the fetched API keys.
      • deleteApiKey

        Task<Void> deleteApiKey​(@NonNull
                                ObjectId id)
        Deletes a user API key associated with the current user.
        Parameters:
        id - The id of the API key to delete.
        Returns:
        A Task that completes when the API key is deleted.
      • enableApiKey

        Task<Void> enableApiKey​(@NonNull
                                ObjectId id)
        Enables a user API key associated with the current user.
        Parameters:
        id - The id of the API key to enable.
        Returns:
        A Task that completes when the API key is enabled.
      • disableApiKey

        Task<Void> disableApiKey​(@NonNull
                                 ObjectId id)
        Disables a user API key associated with the current user.
        Parameters:
        id - The id of the API key to disable.
        Returns:
        A Task that completes when the API key is disabled.