Class AuthInfo
- java.lang.Object
-
- com.mongodb.stitch.core.auth.internal.AuthInfo
-
- Direct Known Subclasses:
ApiAuthInfo
,StoreAuthInfo
public class AuthInfo extends Object
AuthInfo describes the authentication state of a user and the SDK.
-
-
Constructor Summary
Constructors Constructor Description AuthInfo(String userId, String deviceId, String accessToken, String refreshToken, String loggedInProviderType, String loggedInProviderName, StitchUserProfileImpl userProfile, Date lastAuthActivity, com.mongodb.stitch.core.auth.internal.Jwt decodedAccessToken)
Constructs a new AuthInfo that's fully specified.
-
Method Summary
Modifier and Type Method Description boolean
equals(Object o)
String
getAccessToken()
com.mongodb.stitch.core.auth.internal.Jwt
getDecodedAccessToken()
String
getDeviceId()
Date
getLastAuthActivity()
String
getLoggedInProviderName()
String
getLoggedInProviderType()
String
getRefreshToken()
String
getUserId()
StitchUserProfileImpl
getUserProfile()
int
hashCode()
boolean
hasUser()
boolean
isLoggedIn()
-
-
-
Constructor Detail
-
AuthInfo
public AuthInfo(String userId, String deviceId, String accessToken, String refreshToken, String loggedInProviderType, String loggedInProviderName, StitchUserProfileImpl userProfile, Date lastAuthActivity, com.mongodb.stitch.core.auth.internal.Jwt decodedAccessToken)
Constructs a new AuthInfo that's fully specified.- Parameters:
userId
- the id of the currently logged in user.deviceId
- the id of the device this SDK is running on.accessToken
- the access token associated with the user.refreshToken
- the refresh token associated with the user.loggedInProviderType
- the type of auth provider the current user logged in with.loggedInProviderName
- the name of the auth provider the current user logged in with.userProfile
- the profile information about the currently logged in user.lastAuthActivity
- the time since the Unix Epoch since this user was logged into, logged out of, switched to, or switched from.
-
-
Method Detail
-
getUserId
public String getUserId()
-
getDeviceId
public String getDeviceId()
-
getAccessToken
public String getAccessToken()
-
getRefreshToken
public String getRefreshToken()
-
getLoggedInProviderType
public String getLoggedInProviderType()
-
getLoggedInProviderName
public String getLoggedInProviderName()
-
getUserProfile
public StitchUserProfileImpl getUserProfile()
-
getDecodedAccessToken
public com.mongodb.stitch.core.auth.internal.Jwt getDecodedAccessToken()
-
getLastAuthActivity
public Date getLastAuthActivity()
-
isLoggedIn
public boolean isLoggedIn()
-
hasUser
public boolean hasUser()
-
-