Join us at MongoDB.local London on 7 May to unlock new possibilities for your data. Use WEB50 to save 50%.
Register now >
Docs Menu
Docs Home
/ /
io.realm.mongodb.auth

Class ApiKeyAuth

java.lang.Object
io.realm.mongodb.auth.ApiKeyAuth

Esta clase expone la funcionalidad para que un usuario administre claves API bajo su control.

Modificador y Tipo
Método y descripción

protected abstract void

int functionType,
String arg,
OsJavaNetworkTransport.NetworkTransportJNIResultCallback callback
)

public ApiKey

String name
)

Creates a user API key that can be used to authenticate as the user.

Crea de forma asíncrona una clave de API de usuario que puede utilizarse para autenticar como usuario.

public void

ObjectId id
)

Elimina una clave API específica creada por el usuario.

Elimina una clave API específica creada por el usuario.

public void

ObjectId id
)

Disables a specific API key created by the user.

Disables a specific API key created by the user.

public void

ObjectId id
)

Enables a specific API key created by the user.

Enables a specific API key created by the user.

public booleano

public ApiKey

ObjectId id
)

Fetches a specific user API key associated with the user.

Fetches all API keys associated with the user.

pública Lista

Fetches all API keys associated with the user.

Fetches a specific user API key associated with the user.

public App

Devuelve la aplicación con la que esta instancia está asociada.

public User

Returns the User that this instance in associated with.

public int

public String

  • Métodos heredados de la clase java.lang.Object: getClass , hashCode , equals , clone , toString , notify , notifyAll , wait , wait , wait , finalize

protected abstract void call (
int functionType,
String arg,
OsJavaNetworkTransport.NetworkTransportJNIResultCallback callback
)
public ApiKey create (
String name
)

Crea una clave API de usuario que se puede utilizar para autenticarse como usuario. El valor de la clave debe conservarse en este momento, ya que es el único momento en que es visible.

The key is enabled when created. It can be disabled by calling disable(ObjectId) .

Parámetros

  • name - the name of the key

Devuelve

the new API key for the user.

Throws

Crea de forma asincrónica una clave API de usuario que se puede utilizar para autenticarse como usuario. El valor de la clave debe conservarse en este momento, ya que es el único momento en que es visible.

The key is enabled when created. It can be disabled by calling disable(ObjectId) .

Parámetros

  • name - the name of the key

  • callback - callback when key creation has completed or failed. The callback will always happen on the same thread as this method is called on.

Throws

public void delete (
ObjectId id
)

Elimina una clave API específica creada por el usuario.

Parámetros

  • id - the id of the key to delete.

Throws

Elimina una clave API específica creada por el usuario.

Parámetros

  • id - the id of the key to delete.

  • callback - callback used when the was deleted or the call failed. The callback will always happen on the same thread as this method was called on.

Throws

public void disable (
ObjectId id
)

Disables a specific API key created by the user.

Parámetros

  • id - la id de la clave a desactivar.

Throws

Disables a specific API key created by the user.

Parámetros

  • id - la id de la clave a desactivar.

  • callback - función de retorno utilizada cuando la clave fue deshabilitada o la llamada falló. La función de retorno siempre ocurrirá en el mismo hilo en el que se llamó a este método.

Throws

public void enable (
ObjectId id
)

Enables a specific API key created by the user.

Parámetros

  • id - el id de la clave a habilitar.

Throws

Enables a specific API key created by the user.

Parámetros

  • id - el id de la clave a habilitar.

  • callback - callback used when the key was enabled or the call failed. The callback will always happen on the same thread as this method was called on.

Throws

public boolean equals (
)

Anulaciones

equals en la clase Objeto

public ApiKey fetch (
ObjectId id
)

Fetches a specific user API key associated with the user.

Parámetros

  • id - the id of the key to fetch.

Throws

Fetches all API keys associated with the user.

Parámetros

  • callback - callback used when the keys were fetched or the call failed. The callback will always happen on the same thread as this method was called on.

Throws

public List fetchAll ()

Fetches all API keys associated with the user.

Throws

  • AppException: si el servidor no pudo obtener las claves de API.

Fetches a specific user API key associated with the user.

Parámetros

  • id - the id of the key to fetch.

  • callback - Se utiliza la devolución de llamada cuando se obtiene la clave o falla la llamada. La devolución de llamada siempre se realiza en el mismo hilo en el que se invocó este método.

Throws

public App getApp ()

Devuelve la aplicación con la que esta instancia está asociada.

Devuelve

La aplicación con la que esta instancia está asociada.

public User getUser ()

Returns the User that this instance in associated with.

Devuelve

El usuario con el que está asociada esta instancia.

public int hashCode ()

Anulaciones

hashCode en la clase Objeto

public String toString ()

Anulaciones

toString en la clase Objeto

Volver

ApiKey

En esta página