Class ServerApiKeyCredential
- java.lang.Object
-
- com.mongodb.stitch.core.auth.providers.serverapikey.ServerApiKeyCredential
-
- All Implemented Interfaces:
StitchCredential
public final class ServerApiKeyCredential extends Object implements StitchCredential
The credential used for server API key log ins.
-
-
Constructor Summary
Constructors Constructor Description ServerApiKeyCredential(String key)Constructs a server API key credential for a user.
-
Method Summary
Modifier and Type Method Description DocumentgetMaterial()Returns the authentication material for this credential.ProviderCapabilitiesgetProviderCapabilities()Returns the provider capabilities associated with this credential.StringgetProviderName()Returns the authentication provider name that this credential is for.StringgetProviderType()Returns the authentication provider type that this credential is for.
-
-
-
Constructor Detail
-
ServerApiKeyCredential
public ServerApiKeyCredential(String key)
Constructs a server API key credential for a user.- Parameters:
key- the API key.
-
-
Method Detail
-
getProviderName
public String getProviderName()
Description copied from interface:StitchCredentialReturns the authentication provider name that this credential is for. (e.g. local-userpass for the User/Password authentication provider)- Specified by:
getProviderNamein interfaceStitchCredential- Returns:
- the authentication provider name that this credential is for.
-
getProviderType
public String getProviderType()
Description copied from interface:StitchCredentialReturns the authentication provider type that this credential is for. (e.g. local-userpass for the User/Password authentication provider)- Specified by:
getProviderTypein interfaceStitchCredential- Returns:
- the authentication provider type that this credential is for.
-
getMaterial
public Document getMaterial()
Description copied from interface:StitchCredentialReturns the authentication material for this credential. This is the authentication provider specific information if it's necessary. For example, this could be the username and password of an identity when using the User/Password authentication provider.- Specified by:
getMaterialin interfaceStitchCredential- Returns:
- the authentication material for this credential.
-
getProviderCapabilities
public ProviderCapabilities getProviderCapabilities()
Description copied from interface:StitchCredentialReturns the provider capabilities associated with this credential.- Specified by:
getProviderCapabilitiesin interfaceStitchCredential- Returns:
- the provider capabilities associated with this credential.
-
-