Interface StitchUser
-
- All Superinterfaces:
CoreStitchUser
- All Known Implementing Classes:
StitchUserImpl
public interface StitchUser extends CoreStitchUser
A user that belongs to a MongoDB Stitch application.The logged-in, active user can be obtained from a
StitchAuth
instance with theStitchAuth.getUser()
method.Use
StitchAuth.listUsers()
to get a list of the users who are on the device.- See Also:
StitchAuth
-
-
Method Summary
Modifier and Type Method Description Task<StitchUser>
linkWithCredential(StitchCredential credential)
Links this user with another identity represented by the given credential.-
Methods inherited from interface com.mongodb.stitch.core.auth.internal.CoreStitchUser
getCustomData, getDeviceId, getId, getIdentities, getLastAuthActivity, getLoggedInProviderName, getLoggedInProviderType, getProfile, getUserType, isLoggedIn
-
-
-
-
Method Detail
-
linkWithCredential
Task<StitchUser> linkWithCredential(StitchCredential credential)
Links this user with another identity represented by the given credential.Linking allows one user to become associated with another credential. For example, suppose a user logs in anonymously to try the app before deciding to create an account. This method allows the data associated with the anonymous credential to be associated with the new account credential.
- Parameters:
credential
- the credential bound to an identity to link to.- Returns:
- a
Task
containing the newly linked user with a new identity added associated with the given credential.
-
-