Class CustomCredential
- java.lang.Object
-
- com.mongodb.stitch.core.auth.providers.custom.CustomCredential
-
- All Implemented Interfaces:
StitchCredential
public final class CustomCredential extends Object implements StitchCredential
The credential used for custom auth log ins.
-
-
Constructor Summary
Constructors Constructor Description CustomCredential(String token)
Constructs a custom auth credential for a user.
-
Method Summary
Modifier and Type Method Description Document
getMaterial()
Returns the authentication material for this credential.ProviderCapabilities
getProviderCapabilities()
Returns the provider capabilities associated with this credential.String
getProviderName()
Returns the authentication provider name that this credential is for.String
getProviderType()
Returns the authentication provider type that this credential is for.
-
-
-
Constructor Detail
-
CustomCredential
public CustomCredential(String token)
Constructs a custom auth credential for a user.- Parameters:
token
- the signed custom auth token.- See Also:
- Custom Authentication
-
-
Method Detail
-
getProviderName
public String getProviderName()
Description copied from interface:StitchCredential
Returns the authentication provider name that this credential is for. (e.g. local-userpass for the User/Password authentication provider)- Specified by:
getProviderName
in interfaceStitchCredential
- Returns:
- the authentication provider name that this credential is for.
-
getProviderType
public String getProviderType()
Description copied from interface:StitchCredential
Returns the authentication provider type that this credential is for. (e.g. local-userpass for the User/Password authentication provider)- Specified by:
getProviderType
in interfaceStitchCredential
- Returns:
- the authentication provider type that this credential is for.
-
getMaterial
public Document getMaterial()
Description copied from interface:StitchCredential
Returns 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:
getMaterial
in interfaceStitchCredential
- Returns:
- the authentication material for this credential.
-
getProviderCapabilities
public ProviderCapabilities getProviderCapabilities()
Description copied from interface:StitchCredential
Returns the provider capabilities associated with this credential.- Specified by:
getProviderCapabilities
in interfaceStitchCredential
- Returns:
- the provider capabilities associated with this credential.
-
-