Class CoreUserApiKeyAuthProviderClient
- java.lang.Object
-
- com.mongodb.stitch.core.auth.providers.internal.CoreAuthProviderClient<StitchAuthRequestClient>
-
- com.mongodb.stitch.core.auth.providers.userapikey.internal.CoreUserApiKeyAuthProviderClient
-
- Direct Known Subclasses:
UserApiKeyAuthProviderClientImpl
,UserApiKeyAuthProviderClientImpl
public class CoreUserApiKeyAuthProviderClient extends CoreAuthProviderClient<StitchAuthRequestClient>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CoreUserApiKeyAuthProviderClient.ApiKeyFields
-
Constructor Summary
Constructors Modifier Constructor Description protected
CoreUserApiKeyAuthProviderClient(StitchAuthRequestClient authRequestClient, StitchAuthRoutes authRoutes)
-
Method Summary
Modifier and Type Method Description protected UserApiKey
createApiKeyInternal(String name)
Creates a user API key that can be used to authenticate as the current user.protected void
deleteApiKeyInternal(ObjectId id)
Deletes a user API key associated with the current user.protected void
disableApiKeyInternal(ObjectId id)
Disables a user API key associated with the current user.protected void
enableApiKeyInternal(ObjectId id)
Enables a user API key associated with the current user.protected UserApiKey
fetchApiKeyInternal(ObjectId id)
Fetches a user API key associated with the current user.protected List<UserApiKey>
fetchApiKeysInternal()
Fetches the user API keys associated with the current user.-
Methods inherited from class com.mongodb.stitch.core.auth.providers.internal.CoreAuthProviderClient
getBaseRoute, getProviderName, getRequestClient
-
-
-
-
Constructor Detail
-
CoreUserApiKeyAuthProviderClient
protected CoreUserApiKeyAuthProviderClient(StitchAuthRequestClient authRequestClient, StitchAuthRoutes authRoutes)
-
-
Method Detail
-
createApiKeyInternal
protected UserApiKey createApiKeyInternal(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.
-
fetchApiKeyInternal
protected UserApiKey fetchApiKeyInternal(ObjectId id)
Fetches a user API key associated with the current user.- Parameters:
id
- The id of the API key to be fetched.- Returns:
- the API key.
-
fetchApiKeysInternal
protected List<UserApiKey> fetchApiKeysInternal()
Fetches the user API keys associated with the current user.- Returns:
- the user API keys associated with the current user.
-
deleteApiKeyInternal
protected void deleteApiKeyInternal(ObjectId id)
Deletes a user API key associated with the current user.- Parameters:
id
- The id of the API key to delete.
-
enableApiKeyInternal
protected void enableApiKeyInternal(ObjectId id)
Enables a user API key associated with the current user.- Parameters:
id
- The id of the API key to enable.
-
disableApiKeyInternal
protected void disableApiKeyInternal(ObjectId id)
Disables a user API key associated with the current user.- Parameters:
id
- The id of the API key to disable.
-
-