Class JdbcSecurityRealmBuilder

    • Constructor Detail

      • JdbcSecurityRealmBuilder

    • Method Detail

      • setProviders

        public JdbcSecurityRealmBuilder setProviders​(Supplier<Provider[]> providers)
        Set the providers to be used by the realm.
        providers - the providers to be used by the realm.
        this builder.
      • principalQuery

        public QueryBuilder principalQuery​(String sql)

        A SQL SELECT statement that will be used to return data from a database based on the principal's name.

        When authenticating, validating or obtaining credentials for a RealmIdentity, this query will be used. You must provide a SELECT with a single query parameter as follows:

             JdbcSecurityRealm securityRealm = JdbcSecurityRealm.builder().principalQuery("SELECT password FROM user_bcrypt_password where name = ?")

        Where the query parameter value would be the principal's name.

        sql - the authentication query
        this builder