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.
-
-
Field Summary
Fields Modifier and Type Field Description static AuthProviderClientFactory<UserApiKeyAuthProviderClient>
factory
-
Method Summary
Modifier and Type Method Description UserApiKey
createApiKey(String name)
Creates a user API key that can be used to authenticate as the current user.void
deleteApiKey(ObjectId id)
Deletes a user API key associated with the current user.void
disableApiKey(ObjectId id)
Disables a user API key associated with the current user.void
enableApiKey(ObjectId id)
Enables a user API key associated with the current user.UserApiKey
fetchApiKey(ObjectId id)
Fetches a user API key associated with the current user.List<UserApiKey>
fetchApiKeys()
Fetches the user API keys associated with the current user.
-
-
-
Field Detail
-
factory
static final AuthProviderClientFactory<UserApiKeyAuthProviderClient> factory
-
-
Method Detail
-
createApiKey
UserApiKey createApiKey(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:
- The created API key.
-
fetchApiKey
UserApiKey fetchApiKey(ObjectId id)
Fetches a user API key associated with the current user.- Parameters:
id
- The id of the API key to fetch- Returns:
- The fetched API key.
-
fetchApiKeys
List<UserApiKey> fetchApiKeys()
Fetches the user API keys associated with the current user.- Returns:
- A list of the fetched API keys.
-
deleteApiKey
void deleteApiKey(ObjectId id)
Deletes a user API key associated with the current user.- Parameters:
id
- The id of the API key to delete.
-
enableApiKey
void enableApiKey(ObjectId id)
Enables a user API key associated with the current user.- Parameters:
id
- The id of the API key to enable.
-
disableApiKey
void disableApiKey(ObjectId id)
Disables a user API key associated with the current user.- Parameters:
id
- The id of the API key to disable.
-
-