Class StitchUserImpl
- java.lang.Object
-
- com.mongodb.stitch.core.auth.internal.CoreStitchUserImpl
-
- com.mongodb.stitch.android.core.auth.internal.StitchUserImpl
-
- All Implemented Interfaces:
StitchUser
,CoreStitchUser
public final class StitchUserImpl extends CoreStitchUserImpl implements StitchUser
-
-
Constructor Summary
Constructors Constructor Description StitchUserImpl(String id, String deviceId, String loggedInProviderType, String loggedInProviderName, StitchUserProfileImpl profile, StitchAuthImpl auth, boolean isLoggedIn, Date lastAuthActivity, Document customData)
-
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 class com.mongodb.stitch.core.auth.internal.CoreStitchUserImpl
equals, getCustomData, getDeviceId, getId, getIdentities, getLastAuthActivity, getLoggedInProviderName, getLoggedInProviderType, getProfile, getUserType, hashCode, isLoggedIn
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.mongodb.stitch.core.auth.internal.CoreStitchUser
getCustomData, getDeviceId, getId, getIdentities, getLastAuthActivity, getLoggedInProviderName, getLoggedInProviderType, getProfile, getUserType, isLoggedIn
-
-
-
-
Constructor Detail
-
StitchUserImpl
public StitchUserImpl(String id, String deviceId, String loggedInProviderType, String loggedInProviderName, StitchUserProfileImpl profile, StitchAuthImpl auth, boolean isLoggedIn, Date lastAuthActivity, Document customData)
-
-
Method Detail
-
linkWithCredential
public Task<StitchUser> linkWithCredential(StitchCredential credential)
Description copied from interface:StitchUser
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.
- Specified by:
linkWithCredential
in interfaceStitchUser
- 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.
-
-