Package 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 | 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(io.vertx.ext.auth.authentication.Credentials)`
    `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(io.vertx.ext.auth.authentication.Credentials)`
    `static String` | `DEFAULT_PASSWORD_FIELD` | The default name of the property for the password, like it is stored in mongodb
    `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 | Description
    --- | --- | ---
    `static MongoAuthentication` | `create​(MongoClient mongoClient, MongoAuthenticationOptions options)` | Creates an instance of MongoAuth by using the given `MongoClient` and configuration object.
    `default String` | `hash​(String id, String salt, String password)` | Hashes a password to be stored.
    `String` | `hash​(String id, Map<String,​String> params, String salt, String password)` | Hashes a password to be stored.

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

      `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(io.vertx.ext.auth.authentication.Credentials)`
      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(io.vertx.ext.auth.authentication.Credentials)`
      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`

    - #### 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)`