io.vertx.rxjava.ext.auth.jdbc

## Class JDBCAuth

- java.lang.Object
- - io.vertx.rxjava.ext.auth.authentication.AuthenticationProvider
  - - io.vertx.rxjava.ext.auth.AuthProvider
    - - io.vertx.rxjava.ext.auth.jdbc.JDBCAuth

-     public class JDBCAuth
      extends AuthProvider

  Factory interface for creating `AuthenticationProvider` instances that use the Vert.x JDBC client. By default the hashing strategy is SHA-512. If you're already running in production this is backwards compatible, however for new deployments or security upgrades it is recommended to use the PBKDF2 strategy as it is the current OWASP recommendation for password storage.

  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 and Description
    --- | ---
    `static io.vertx.lang.rx.TypeArg<JDBCAuth>` | `__TYPE_ARG`
    `static String` | `DEFAULT_AUTHENTICATE_QUERY` The default query to be used for authentication
    `static String` | `DEFAULT_PERMISSIONS_QUERY` The default query to retrieve all permissions for the role
    `static String` | `DEFAULT_ROLE_PREFIX` The default role prefix
    `static String` | `DEFAULT_ROLES_QUERY` The default query to retrieve all roles for the user

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JDBCAuth(JDBCAuth delegate)`
    `JDBCAuth(Object delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `computeHash(String password, String salt)` Deprecated.
    `String` | `computeHash(String password, String salt, int version)` Deprecated.
    `static JDBCAuth` | `create(Vertx vertx, JDBCClient client)` Deprecated.
    `boolean` | `equals(Object o)`
    `String` | `generateSalt()` Deprecated.
    `JDBCAuth` | `getDelegate()`
    `int` | `hashCode()`
    `static JDBCAuth` | `newInstance(JDBCAuth arg)`
    `JDBCAuth` | `setAuthenticationQuery(String authenticationQuery)` Deprecated.
    `JDBCAuth` | `setNonces(JsonArray nonces)` Deprecated.
    `JDBCAuth` | `setPermissionsQuery(String permissionsQuery)` Deprecated.
    `JDBCAuth` | `setRolePrefix(String rolePrefix)` Deprecated.
    `JDBCAuth` | `setRolesQuery(String rolesQuery)` Deprecated.
    `String` | `toString()`

    - ### Methods inherited from class io.vertx.rxjava.ext.auth.AuthProvider

      `newInstance`

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

      `authenticate, authenticate, authenticate, authenticate, newInstance, rxAuthenticate, rxAuthenticate`

    - ### 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<JDBCAuth> __TYPE_ARG

    - #### DEFAULT_AUTHENTICATE_QUERY

          public static final String DEFAULT_AUTHENTICATE_QUERY

      The default query to be used for authentication
      See Also:
        Constant Field Values

    - #### DEFAULT_ROLES_QUERY

          public static final String DEFAULT_ROLES_QUERY

      The default query to retrieve all roles for the user
      See Also:
        Constant Field Values

    - #### DEFAULT_PERMISSIONS_QUERY

          public static final String DEFAULT_PERMISSIONS_QUERY

      The default query to retrieve all permissions for the role
      See Also:
        Constant Field Values

    - #### DEFAULT_ROLE_PREFIX

          public static final String DEFAULT_ROLE_PREFIX

      The default role prefix
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### JDBCAuth

          public JDBCAuth(JDBCAuth delegate)

    - #### JDBCAuth

          public JDBCAuth(Object delegate)

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `AuthProvider`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `AuthProvider`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `AuthProvider`

    - #### getDelegate

          public JDBCAuth getDelegate()

      Overrides:
        `getDelegate` in class `AuthProvider`

    - #### create

          @Deprecated
          public static JDBCAuth create(Vertx vertx,
                                                    JDBCClient client)

      Deprecated.
      Create a JDBC auth provider implementation
      Parameters:
        `vertx` -
        `client` - the JDBC client instance
      Returns:
        the auth provider

    - #### setAuthenticationQuery

          @Deprecated
          public JDBCAuth setAuthenticationQuery(String authenticationQuery)

      Deprecated.
      Set the authentication query to use. Use this if you want to override the default authentication query.
      Parameters:
        `authenticationQuery` - the authentication query
      Returns:
        a reference to this for fluency

    - #### setRolesQuery

          @Deprecated
          public JDBCAuth setRolesQuery(String rolesQuery)

      Deprecated.
      Set the roles query to use. Use this if you want to override the default roles query.
      Parameters:
        `rolesQuery` - the roles query
      Returns:
        a reference to this for fluency

    - #### setPermissionsQuery

          @Deprecated
          public JDBCAuth setPermissionsQuery(String permissionsQuery)

      Deprecated.
      Set the permissions query to use. Use this if you want to override the default permissions query.
      Parameters:
        `permissionsQuery` - the permissions query
      Returns:
        a reference to this for fluency

    - #### setRolePrefix

          @Deprecated
          public JDBCAuth setRolePrefix(String rolePrefix)

      Deprecated.
      Set the role prefix to distinguish from permissions when checking for isPermitted requests.
      Parameters:
        `rolePrefix` - a Prefix e.g.: "role:"
      Returns:
        a reference to this for fluency

    - #### computeHash

          @Deprecated
          public String computeHash(String password,
                                                String salt)

      Deprecated.
      Compute the hashed password given the unhashed password and the salt without nonce The implementation relays to the JDBCHashStrategy provided.
      Parameters:
        `password` - the unhashed password
        `salt` - the salt
      Returns:
        the hashed password

    - #### computeHash

          @Deprecated
          public String computeHash(String password,
                                                String salt,
                                                int version)

      Deprecated.
      Compute the hashed password given the unhashed password and the salt The implementation relays to the JDBCHashStrategy provided.
      Parameters:
        `password` - the unhashed password
        `salt` - the salt
        `version` - the nonce version to use
      Returns:
        the hashed password

    - #### generateSalt

          @Deprecated
          public String generateSalt()

      Deprecated.
      Compute a salt string. The implementation relays to the JDBCHashStrategy provided.
      Returns:
        a non null salt value

    - #### setNonces

          @Deprecated
          public JDBCAuth setNonces(JsonArray nonces)

      Deprecated.
      Provide a application configuration level on hash nonce's as a ordered list of nonces where each position corresponds to a version. The nonces are supposed not to be stored in the underlying jdbc storage but to be provided as a application configuration. The idea is to add one extra variable to the hash function in order to make breaking the passwords using rainbow tables or precomputed hashes harder. Leaving the attacker only with the brute force approach. The implementation relays to the JDBCHashStrategy provided.
      Parameters:
        `nonces` - a List of non null Strings.
      Returns:
        a reference to this for fluency

    - #### newInstance

          public static JDBCAuth newInstance(JDBCAuth arg)

Copyright © 2021 Eclipse. All rights reserved.