io.realm.mongodb
A user holds the user's meta data and tokens for accessing Realm App functionality.The user is used to configure Synchronized Realms and gives access to calling Realm App Functions through Functions and accessing remote Realm App
Mongo Databases through a MongoClient .
Tip
io.realm.mongodb.sync.SyncConfiguration.Builder.Builder(User, String)
Nested Class Summary
Modificador y Tipo | Clase y descripción |
|---|---|
|
Resumen del método
Modificador y Tipo | Método y descripción |
|---|---|
public booleano | |
public String | Returns the current access token for the user. |
public synchronized ApiKeyAuth | getApiKeys () Devuelve un contenedor para gestionar claves API controladas por el usuario actual. |
public App | getApp () Devuelve la aplicación con la que está asociado este usuario. |
public Document | Return the custom user data associated with the user in the Realm App. |
public String | getDeviceId () Returns a unique identifier for the device the user logged in to. |
public Functions | Returns a functions manager for invoking Realm Functions with custom codec registry for encoding and decoding arguments and results. |
public synchronized Functions | getFunctions () Devuelve un administrador de funciones para invocar funciones de MongoDB Realm. |
public String | getId () Returns the server id of the user. |
pública Lista | Devuelve una nueva lista de identidades del usuario. |
public synchronized MongoClient | Returns a MongoClient instance for accessing documents in the database. |
public UserProfile | getProfile () Devuelve el perfil de este usuario. |
public Credentials.Provider | Returns the provider type used to log the user |
public synchronized Push | Devuelve la instancia Push para administrar los registros de notificaciones push. |
public String | Devuelve el token de actualización actual para el usuario. |
public User.State | |
public int | hashCode () |
public booleano | isLoggedIn () Returns true if the user is currently logged in. |
public User | Links the current user with a new user identity represented by the given credentials. |
public RealmAsyncTask | Credentials credentials, ) Links the current user with a new user identity represented by the given credentials. |
public void | logOut () Log the user out of the Realm App. |
public RealmAsyncTask | Cerrar la sesión del usuario de la Aplicación Realm de forma asíncrona. |
public RealmAsyncTask | Re-fetch custom user data from the Realm App asynchronously. |
public Document | Re-fetch custom user data from the Realm App. |
public User | remove () Al llamar a esto se eliminará al usuario y cualquier Reino que tenga el usuario del dispositivo. |
public RealmAsyncTask | Calling this will asynchronously remove the user and any Realms the user has from the device. |
Inherited Methods
Methods inherited from class java.lang.Object :
getClass,hashCode,equals,clone,toString,notify,notifyAll,wait,wait,wait,finalize
Detalle del método
equals
getAccessToken
public String getAccessToken () |
|---|
Returns the current access token for the user. Devuelve the current access token. |
getApiKeys
public synchronized ApiKeyAuth getApiKeys () |
|---|
Devuelve un contenedor para gestionar claves API controladas por el usuario actual. Devuelve wrapper for managing API keys controlled by the current user. Throws
|
getApp
Devuelve la aplicación con la que está asociado este usuario. Devuelve the App this user is associated with. |
getCustomData
public Document getCustomData () |
|---|
Devuelve los datos de usuario personalizados asociados al usuario en la aplicación de Realm. Los datos solo se actualizan cuando el token de acceso del usuario se actualiza o cuando se llama explícitamente a refreshCustomData() . Devuelve The custom user data associated with the user. |
getDeviceId
public String getDeviceId () |
|---|
Returns a unique identifier for the device the user logged in to. Devuelve a unique device identifier for the user. |
getFunctions
Returns a functions manager for invoking Realm Functions with custom codec registry for encoding and decoding arguments and results. Parámetros
Tip |
public synchronized Functions getFunctions () |
|---|
Devuelve un administrador de funciones para invocar funciones de MongoDB Realm. Esto utilizará el registro de códec predeterminado de la aplicación asociada para codificar y decodificar argumentos y resultados. Tip |
getId
getIdentities
public List getIdentities () |
|---|
getMongoClient
Returns a MongoClient instance for accessing documents in the database. Parámetros
|
getProfile
public UserProfile getProfile () |
|---|
Devuelve el perfil de este usuario. Devuelve the profile for this user |
getProviderType
public Credentials.Provider getProviderType () |
|---|
Returns the provider type used to log the user Devuelve the provider type of the user |
getPush
Devuelve la instancia Push para administrar los registros de notificaciones push. Parámetros
|
getRefreshToken
public String getRefreshToken () |
|---|
Devuelve el token de actualización actual para el usuario. Devuelve el token de actualización actual. |
getState
public User.State getState () |
|---|
hashCode
isLoggedIn
public boolean isLoggedIn () |
|---|
Returns true if the user is currently logged in. Returns whether or not this user is still logged into the MongoDB Realm App. Devuelve
|
Credenciales de enlace
Links the current user with a new user identity represented by the given credentials.Linking a user with more credentials, mean the user can login either of these credentials. It also makes it possible to "upgrade" an anonymous user by linking it with e.g. Email/Password credentials. Nota: No es posible vincular dos usuarios existentes de MongoDB Realm. Las credenciales proporcionadas no deben haber sido utilizadas por otro usuario. Parámetros
Devuelve el Usuario al que estaban vinculadas las credenciales. Throws
|
linkCredentialsAsync
Links the current user with a new user identity represented by the given credentials.Linking a user with more credentials, mean the user can login either of these credentials. It also makes it possible to "upgrade" an anonymous user by linking it with e.g. Email/Password credentials. Nota: No es posible vincular dos usuarios existentes de MongoDB Realm. Las credenciales proporcionadas no deben haber sido utilizadas por otro usuario. Parámetros
Throws
|
logOut
public void logOut () |
|---|
Log the user out of the Realm App. This will unregister them on the device and stop any synchronization to and from the users' Realms. Any Realms owned by the user will not be deleted from the device before User.remove() is called. Una vez que la aplicación Realm ha confirmado el cierre de sesión, cualquier AuthenticationListener registrado será notificado y las credenciales del usuario se borrarán de este dispositivo. Logging out anonymous users will remove them immediately instead of marking them as User.State.LOGGED_OUT . All other users will be marked as User.State.LOGGED_OUT and will still be returned by App.allUsers() . They can be removed completely by calling User.remove() . Throws
|
logOutAsync
Log the user out of the Realm App asynchronously. This will unregister them on the device and stop any synchronization to and from the users' Realms. Any Realms owned by the user will not be deleted from the device before User.remove() is called. Una vez que la aplicación Realm ha confirmado el cierre de sesión, cualquier AuthenticationListener registrado será notificado y las credenciales del usuario se borrarán de este dispositivo. Logging out anonymous users will remove them immediately instead of marking them as User.State.LOGGED_OUT . All other users will be marked as User.State.LOGGED_OUT and will still be returned by App.allUsers() . They can be removed completely by calling User.remove() . Parámetros
Throws
|
refreshCustomData
Recupere datos de usuario personalizados de la aplicación Realm de forma asincrónica. Esta es la variante asincrónica de refreshCustomData(). Parámetros
Devuelve The task representing the ongoing operation. Throws
|
public Document refreshCustomData () |
|---|
Re-fetch custom user data from the Realm App. Devuelve The updated custom user data associated with the user. Throws
|
Remover
Al llamar a este método, se eliminará al usuario y cualquier dominio que tenga del dispositivo. No se eliminan datos del servidor. Si el usuario tiene la sesión iniciada al llamar a este método, se cerrará la sesión antes de eliminar los datos. Devuelve el usuario que fue eliminado. Throws
|
removeAsync
Al llamar a este método, se eliminará asincrónicamente del dispositivo al usuario y cualquier dominio que tenga. No se eliminan datos del servidor. Si el usuario tiene la sesión iniciada al llamar a este método, se cerrará la sesión antes de eliminar los datos. Parámetros
Throws
|