Make the MongoDB docs better! We value your opinion. Share your feedback for a chance to win $100.
Click here >
Docs Menu
Docs Home
/ /
io.realm.mongodb.auth

Class ApiKeyAuth

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

This class exposes functionality for a user to manage API keys under their 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
)

Deletes a specific API key created by the user.

Deletes a specific API key created by the user.

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
)

Deletes a specific API key created by the user.

Parámetros

  • id - the id of the key to delete.

Throws

Deletes a specific API key created by the user.

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 - callback used when the key was fetched or the call failed. The callback will always happen on the same thread as this method was called on.

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