Package com.mongodb.stitch.core.auth
Class StitchUserIdentity
- java.lang.Object
-
- com.mongodb.stitch.core.auth.StitchUserIdentity
-
- Direct Known Subclasses:
ApiStitchUserIdentity
public class StitchUserIdentity extends Object
An identity that belongs to a Stitch user.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
StitchUserIdentity(StitchUserIdentity identity)
StitchUserIdentity(String id, String providerType)
Constructs a new identity with the given id and provider type.
-
Method Summary
Modifier and Type Method Description String
getId()
Returns the id of the identity.String
getProviderType()
Returns the type of the provider that this identity is for.
-
-
-
Constructor Detail
-
StitchUserIdentity
public StitchUserIdentity(String id, String providerType)
Constructs a new identity with the given id and provider type.- Parameters:
id
- the id of the identity.providerType
- the type of the provider.
-
StitchUserIdentity
protected StitchUserIdentity(StitchUserIdentity identity)
-
-
Method Detail
-
getId
public String getId()
Returns the id of the identity. This is generally an opaque value that shouldn't be used.- Returns:
- the id of the identity.
-
getProviderType
public String getProviderType()
Returns the type of the provider that this identity is for. A user may be linked to multiple identities of the same provider type. This value is useful to check if a user has not registered with a certain provider yet.- Returns:
- the type of the provider that this identity is for.
-
-