Constructor and Description |
---|
RealmFileUserStore() |
Modifier and Type | Method and Description |
---|---|
Collection<SyncUser> |
allUsers()
Returns a collection of all users saved in the User store.
|
SyncUser |
get(String identity,
String authUrl)
Retrieves specified
SyncUser . |
SyncUser |
getCurrent()
Retrieves the current
SyncUser . |
boolean |
isActive(String identity,
String authenticationUrl)
Returns the state of the specified user:
true if active (not logged out), false otherwise. |
void |
put(SyncUser user)
Saves a
SyncUser object. |
void |
remove(String identity,
String authUrl)
Removes the user from the store.
|
public void put(SyncUser user)
SyncUser
object. If another user already exists, it will be replaced.
SyncUser.getIdentity()
is used as a unique identifier of a given SyncUser
.public SyncUser getCurrent()
SyncUser
.
This method will throw an exception if more than one valid, logged in users exist.
getCurrent
in interface UserStore
SyncUser
object or null
if not found.public void remove(String identity, String authUrl)
If the user is not found, this method does nothing.
public Collection<SyncUser> allUsers()
public boolean isActive(String identity, String authenticationUrl)
true
if active (not logged out), false
otherwise.
This method checks if the user was marked as logged out. If the user has expired but not actively logged out
this method will return true
.