io.vertx.ext.auth.mongo

## Interface MongoAuthentication

- All Superinterfaces:
    AuthenticationProvider

      public interface MongoAuthentication
      extends AuthenticationProvider

  An extension of AuthProvider which is using `MongoClient` as store
  Author:
    francoisprunier

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `DEFAULT_COLLECTION_NAME` The default name of the collection to be used
    `static String` | `DEFAULT_CREDENTIAL_PASSWORD_FIELD` The default name of the property for the password, like it is transported in credentials by method `AuthenticationProvider.authenticate(JsonObject, Handler)`
    `static String` | `DEFAULT_CREDENTIAL_USERNAME_FIELD` The default name of the property for the username, like it is transported in credentials by method `AuthenticationProvider.authenticate(JsonObject, Handler)`
    `static String` | `DEFAULT_PASSWORD_FIELD` The default name of the property for the password, like it is stored in mongodb
    `static String` | `DEFAULT_SALT_FIELD` The default name of the property for the salt field
    `static String` | `DEFAULT_USERNAME_FIELD` The default name of the property for the username, like it is stored in mongodb

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static MongoAuthentication` | `create(MongoClient mongoClient, HashStrategy hashStrategy, MongoAuthenticationOptions options)`
    `static MongoAuthentication` | `create(MongoClient mongoClient, MongoAuthenticationOptions options)` Creates an instance of MongoAuth by using the given `MongoClient` and configuration object.
    `String` | `hash(String id, Map<String,String> params, String salt, String password)` Hashes a password to be stored.
    `default String` | `hash(String id, String salt, String password)` Hashes a password to be stored.

    - ### Methods inherited from interface io.vertx.ext.auth.authentication.AuthenticationProvider

      `authenticate, authenticate, authenticate, authenticate`

- - ### Field Detail

    - #### DEFAULT_COLLECTION_NAME

          static final String DEFAULT_COLLECTION_NAME

      The default name of the collection to be used
      See Also:
        Constant Field Values

    - #### DEFAULT_USERNAME_FIELD

          static final String DEFAULT_USERNAME_FIELD

      The default name of the property for the username, like it is stored in mongodb
      See Also:
        Constant Field Values

    - #### DEFAULT_PASSWORD_FIELD

          static final String DEFAULT_PASSWORD_FIELD

      The default name of the property for the password, like it is stored in mongodb
      See Also:
        Constant Field Values

    - #### DEFAULT_CREDENTIAL_USERNAME_FIELD

          static final String DEFAULT_CREDENTIAL_USERNAME_FIELD

      The default name of the property for the username, like it is transported in credentials by method `AuthenticationProvider.authenticate(JsonObject, Handler)`
      See Also:
        Constant Field Values

    - #### DEFAULT_CREDENTIAL_PASSWORD_FIELD

          static final String DEFAULT_CREDENTIAL_PASSWORD_FIELD

      The default name of the property for the password, like it is transported in credentials by method `AuthenticationProvider.authenticate(JsonObject, Handler)`
      See Also:
        Constant Field Values

    - #### DEFAULT_SALT_FIELD

          static final String DEFAULT_SALT_FIELD

      The default name of the property for the salt field
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### create

          static MongoAuthentication create(MongoClient mongoClient,
                                            MongoAuthenticationOptions options)

      Creates an instance of MongoAuth by using the given `MongoClient` and configuration object.
      Parameters:
        `mongoClient` - an instance of `MongoClient` to be used for data storage and retrival
        `options` - the configuration object for the current instance.
      Returns:
        the created instance of `MongoAuthentication`

    - #### create

          static MongoAuthentication create(MongoClient mongoClient,
                                            HashStrategy hashStrategy,
                                            MongoAuthenticationOptions options)

    - #### hash

          String hash(String id,
                      Map<String,String> params,
                      String salt,
                      String password)

      Hashes a password to be stored. See: `HashingStrategy.hash(String, Map, String, String)`

    - #### hash

          default String hash(String id,
                              String salt,
                              String password)

      Hashes a password to be stored. See: `HashingStrategy.hash(String, Map, String, String)`

Copyright © 2023 Eclipse. All rights reserved.