Class UserSessionService
-
- All Implemented Interfaces:
public final class UserSessionService extends MobileService
Represents the service to check if the user is the correct one.
-
-
Field Summary
Fields Modifier and Type Field Description private DeviceUsercurrentUserprivate Applicationapplicationprivate StringapiKey
-
Constructor Summary
Constructors Constructor Description UserSessionService(Function0<Unit> userNotMatchCallback)
-
Method Summary
Modifier and Type Method Description final DeviceUsergetCurrentUser()The current user final UnitsetCurrentUser(DeviceUser currentUser)The current user final UnitcheckUserSession(OAuth2Token token)Check user session matches. -
Methods inherited from class com.sap.cloud.mobile.foundation.mobileservices.MobileService
enableNetworkPolicy, getApiKey, getApplication, init, isApplicationInitialized, mayStartNewProcess, onStateChange, reset, setApiKey, setApplication -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getCurrentUser
final DeviceUser getCurrentUser()
The current user
-
setCurrentUser
final Unit setCurrentUser(DeviceUser currentUser)
The current user
-
checkUserSession
final Unit checkUserSession(OAuth2Token token)
Check user session matches.
-
-
-
-