Package io.vertx.reactivex.ext.auth.webauthn4j

## Class CredentialStorage

- java.lang.Object
- - io.vertx.reactivex.ext.auth.webauthn4j.CredentialStorage

- All Implemented Interfaces:
    `io.vertx.lang.rx.RxDelegate`

      public class CredentialStorage
      extends Object
      implements io.vertx.lang.rx.RxDelegate

  Used to represent persistent storage of credentials, this gives you a way to abstract how you want to store them (in memory, database, other).

  NOTE: This class has been automatically generated from the `original` non RX-ified interface using Vert.x codegen.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static io.vertx.lang.rx.TypeArg<CredentialStorage>` | `__TYPE_ARG` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `CredentialStorage​(CredentialStorage delegate)` |
    `CredentialStorage​(Object delegate)` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `boolean` | `equals​(Object o)` |
    `Future<List<Authenticator>>` | `find​(String userName, String credentialId)` | Finds an existing list of credentials for a given user name and credential ID.
    `CredentialStorage` | `getDelegate()` |
    `int` | `hashCode()` |
    `static CredentialStorage` | `newInstance​(CredentialStorage arg)` |
    `Single<List<Authenticator>>` | `rxFind​(String userName, String credentialId)` | Finds an existing list of credentials for a given user name and credential ID.
    `Completable` | `rxStoreCredential​(Authenticator authenticator)` | Persists a new credential, bound by its user name (may be `null`) and credential ID (cannot be `null`, must be unique).
    `Completable` | `rxUpdateCounter​(Authenticator authenticator)` | Updates a previously stored credential counter, as identified by its user name (may be `null`) and credential ID (cannot be `null`, must be unique).
    `Future<Void>` | `storeCredential​(Authenticator authenticator)` | Persists a new credential, bound by its user name (may be `null`) and credential ID (cannot be `null`, must be unique).
    `String` | `toString()` |
    `Future<Void>` | `updateCounter​(Authenticator authenticator)` | Updates a previously stored credential counter, as identified by its user name (may be `null`) and credential ID (cannot be `null`, must be unique).

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### __TYPE_ARG

          public static final io.vertx.lang.rx.TypeArg<CredentialStorage> __TYPE_ARG

  - ### Constructor Detail

    - #### CredentialStorage

          public CredentialStorage​(CredentialStorage delegate)

    - #### CredentialStorage

          public CredentialStorage​(Object delegate)

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### equals

          public boolean equals​(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### getDelegate

          public CredentialStorage getDelegate()

      Specified by:
        `getDelegate` in interface `io.vertx.lang.rx.RxDelegate`

    - #### find

          public Future<List<Authenticator>> find​(String userName,
                                                  String credentialId)

      Finds an existing list of credentials for a given user name and credential ID. Both the `userName` and `credentialId` parameters are optional but at least one of them must be specified. If only one is specified, it must match the results. If both are specified, then both must match the result at the same time. This may return more than one element if one of the parameters is not set. If both are set, then the returned list of credentials must contain at maximum 1 element. If the user is not known or does not allow any authenticator, returns an empty list.
      Parameters:
        `userName` - the user name (may be `null`, but must match if specified)
        `credentialId` - the credential ID (must match the results)
      Returns:
        the list of authenticators allowed for the given userName and credential ID, or an empty list.

    - #### rxFind

          public Single<List<Authenticator>> rxFind​(String userName,
                                                    String credentialId)

      Finds an existing list of credentials for a given user name and credential ID. Both the `userName` and `credentialId` parameters are optional but at least one of them must be specified. If only one is specified, it must match the results. If both are specified, then both must match the result at the same time. This may return more than one element if one of the parameters is not set. If both are set, then the returned list of credentials must contain at maximum 1 element. If the user is not known or does not allow any authenticator, returns an empty list.
      Parameters:
        `userName` - the user name (may be `null`, but must match if specified)
        `credentialId` - the credential ID (must match the results)
      Returns:
        the list of authenticators allowed for the given userName and credential ID, or an empty list.

    - #### storeCredential

          public Future<Void> storeCredential​(Authenticator authenticator)

      Persists a new credential, bound by its user name (may be `null`) and credential ID (cannot be `null`, must be unique). If attempting to store a credential with a `credId` that is not unique, you should return a failed `Future`. If attempting to store a credential with a `userName` that already exists, you should first make sure that the current user is already logged in under the same `userName`, because this will in practice add a new credential to identify the existing user, so this must be restricted to the already existing user, otherwise you will allow anyone to gain access to existing users. If attempting to store a credential with a `userName` that already exists, and the current user is not logged in, or the logged in user does not have the same `userName`, you should return a failed `Future`.
      Parameters:
        `authenticator` - the new credential to persist
      Returns:
        a future of nothing, or a failed future if the `credId` already exists, or if the `userName` already exists and does not represent the currently logged in user.

    - #### rxStoreCredential

          public Completable rxStoreCredential​(Authenticator authenticator)

      Persists a new credential, bound by its user name (may be `null`) and credential ID (cannot be `null`, must be unique). If attempting to store a credential with a `credId` that is not unique, you should return a failed `Future`. If attempting to store a credential with a `userName` that already exists, you should first make sure that the current user is already logged in under the same `userName`, because this will in practice add a new credential to identify the existing user, so this must be restricted to the already existing user, otherwise you will allow anyone to gain access to existing users. If attempting to store a credential with a `userName` that already exists, and the current user is not logged in, or the logged in user does not have the same `userName`, you should return a failed `Future`.
      Parameters:
        `authenticator` - the new credential to persist
      Returns:
        a future of nothing, or a failed future if the `credId` already exists, or if the `userName` already exists and does not represent the currently logged in user.

    - #### updateCounter

          public Future<Void> updateCounter​(Authenticator authenticator)

      Updates a previously stored credential counter, as identified by its user name (may be `null`) and credential ID (cannot be `null`, must be unique).
      Parameters:
        `authenticator` - the credential to update
      Returns:
        a future of nothing

    - #### rxUpdateCounter

          public Completable rxUpdateCounter​(Authenticator authenticator)

      Updates a previously stored credential counter, as identified by its user name (may be `null`) and credential ID (cannot be `null`, must be unique).
      Parameters:
        `authenticator` - the credential to update
      Returns:
        a future of nothing

    - #### newInstance

          public static CredentialStorage newInstance​(CredentialStorage arg)