io.vertx.ext.auth.webauthn

## Interface CredentialStore

-     public interface CredentialStore

  Generic interface to fetch user related information from a server backend. All methods of this interface are optional.
  Author:
    Paulo Lopes

- - ### Method Summary

    All Methods Instance Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default String` | `generateId()` Generates a unique ID that doesn't contain any user identifiable information.
    `default Future<List<JsonObject>>` | `getUserCredentialsById(String rawId)` Same as `getUserCredentialsById(String, Handler)` but using a Future.
    `default CredentialStore` | `getUserCredentialsById(String rawId, Handler<AsyncResult<List<JsonObject>>> handler)` Retrieves the user credentials from a backend given the user unique identifier.
    `default Future<List<JsonObject>>` | `getUserCredentialsByName(String username)` Same as `getUserCredentialsByName(String, Handler)` but using a Future.
    `default CredentialStore` | `getUserCredentialsByName(String username, Handler<AsyncResult<List<JsonObject>>> handler)` Retrieves the user credentials from a backend given the user unique identifier.
    `default Future<Void>` | `updateUserCredential(String id, JsonObject data, boolean upsert)` Same as `updateUserCredential(String, JsonObject, boolean, Handler)` but using a Future.
    `default CredentialStore` | `updateUserCredential(String id, JsonObject data, boolean upsert, Handler<AsyncResult<Void>> handler)` Update the user credential.

- - ### Method Detail

    - #### generateId

          default String generateId()

      Generates a unique ID that doesn't contain any user identifiable information. By default it generates a random UUID. Although this is will work for most cases a better implementation that prevents collisions of IDs should be preferred.
      Returns:
        a new unique ID as a string

    - #### getUserCredentialsByName

          default CredentialStore getUserCredentialsByName(String username,
                                                           Handler<AsyncResult<List<JsonObject>>> handler)

      Retrieves the user credentials from a backend given the user unique identifier. It may return more than 1 result, for example when a user can be identified using different modalities.
      Parameters:
        `username` - user unique name.
        `handler` - the handler for the result callback.
      Returns:
        fluent self.

    - #### getUserCredentialsByName

          default Future<List<JsonObject>> getUserCredentialsByName(String username)

      Same as `getUserCredentialsByName(String, Handler)` but using a Future.

    - #### getUserCredentialsById

          default CredentialStore getUserCredentialsById(String rawId,
                                                         Handler<AsyncResult<List<JsonObject>>> handler)

      Retrieves the user credentials from a backend given the user unique identifier. It may return more than 1 result, for example when a user can be identified using different modalities.
      Parameters:
        `rawId` - user unique rawId.
        `handler` - the handler for the result callback.
      Returns:
        fluent self.

    - #### getUserCredentialsById

          default Future<List<JsonObject>> getUserCredentialsById(String rawId)

      Same as `getUserCredentialsById(String, Handler)` but using a Future.

    - #### updateUserCredential

          default CredentialStore updateUserCredential(String id,
                                                       JsonObject data,
                                                       boolean upsert,
                                                       Handler<AsyncResult<Void>> handler)

      Update the user credential.
      Parameters:
        `id` - the unique user identifier.
        `data` - the data to update.
        `upsert` - insert if not present.
        `handler` - the handler for the result callback.
      Returns:
        fluent self.

    - #### updateUserCredential

          default Future<Void> updateUserCredential(String id,
                                                    JsonObject data,
                                                    boolean upsert)

      Same as `updateUserCredential(String, JsonObject, boolean, Handler)` but using a Future.

Copyright © 2020 Eclipse. All rights reserved.