Class UserApiKeyAuthProviderClientImpl
- java.lang.Object
-
- com.mongodb.stitch.core.auth.providers.internal.CoreAuthProviderClient<StitchAuthRequestClient>
-
- com.mongodb.stitch.core.auth.providers.userapikey.internal.CoreUserApiKeyAuthProviderClient
-
- com.mongodb.stitch.server.core.auth.providers.userapikey.internal.UserApiKeyAuthProviderClientImpl
-
- All Implemented Interfaces:
UserApiKeyAuthProviderClient
public final class UserApiKeyAuthProviderClientImpl extends CoreUserApiKeyAuthProviderClient implements UserApiKeyAuthProviderClient
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.mongodb.stitch.core.auth.providers.userapikey.internal.CoreUserApiKeyAuthProviderClient
CoreUserApiKeyAuthProviderClient.ApiKeyFields
-
-
Field Summary
-
Fields inherited from interface com.mongodb.stitch.server.core.auth.providers.userapikey.UserApiKeyAuthProviderClient
factory
-
-
Constructor Summary
Constructors Constructor Description UserApiKeyAuthProviderClientImpl(StitchAuthRequestClient requestClient, StitchAuthRoutes routes)
-
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.-
Methods inherited from class com.mongodb.stitch.core.auth.providers.userapikey.internal.CoreUserApiKeyAuthProviderClient
createApiKeyInternal, deleteApiKeyInternal, disableApiKeyInternal, enableApiKeyInternal, fetchApiKeyInternal, fetchApiKeysInternal
-
Methods inherited from class com.mongodb.stitch.core.auth.providers.internal.CoreAuthProviderClient
getBaseRoute, getProviderName, getRequestClient
-
-
-
-
Constructor Detail
-
UserApiKeyAuthProviderClientImpl
public UserApiKeyAuthProviderClientImpl(StitchAuthRequestClient requestClient, StitchAuthRoutes routes)
-
-
Method Detail
-
createApiKey
public UserApiKey createApiKey(String name)
Creates a user API key that can be used to authenticate as the current user.- Specified by:
createApiKey
in interfaceUserApiKeyAuthProviderClient
- Parameters:
name
- The name of the API key to be created- Returns:
- The created API key.
-
fetchApiKey
public UserApiKey fetchApiKey(ObjectId id)
Fetches a user API key associated with the current user.- Specified by:
fetchApiKey
in interfaceUserApiKeyAuthProviderClient
- Parameters:
id
- The id of the API key to fetch- Returns:
- The fetched API key.
-
fetchApiKeys
public List<UserApiKey> fetchApiKeys()
Fetches the user API keys associated with the current user.- Specified by:
fetchApiKeys
in interfaceUserApiKeyAuthProviderClient
- Returns:
- A list of the fetched API keys.
-
deleteApiKey
public void deleteApiKey(ObjectId id)
Deletes a user API key associated with the current user.- Specified by:
deleteApiKey
in interfaceUserApiKeyAuthProviderClient
- Parameters:
id
- The id of the API key to delete.
-
enableApiKey
public void enableApiKey(ObjectId id)
Enables a user API key associated with the current user.- Specified by:
enableApiKey
in interfaceUserApiKeyAuthProviderClient
- Parameters:
id
- The id of the API key to enable.
-
disableApiKey
public void disableApiKey(ObjectId id)
Disables a user API key associated with the current user.- Specified by:
disableApiKey
in interfaceUserApiKeyAuthProviderClient
- Parameters:
id
- The id of the API key to disable.
-
-