All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.quarkus.elytron.security.jdbc.ClearPasswordMapperConfig Maven / Gradle / Ivy

There is a newer version: 3.17.0
Show newest version
package io.quarkus.elytron.security.jdbc;

import org.wildfly.security.auth.realm.jdbc.mapper.PasswordKeyMapper;

import io.quarkus.runtime.annotations.ConfigGroup;
import io.smallrye.config.WithDefault;

/**
 * Configuration information used to populate a "clear"
 * {@linkplain org.wildfly.security.auth.realm.jdbc.mapper.PasswordKeyMapper}
 */
@ConfigGroup
public interface ClearPasswordMapperConfig {

    String CLEAR = "clear";

    /**
     * If the clear-password-mapper is enabled.
     */
    @WithDefault("false")
    boolean enabled();

    /**
     * The index (1 based numbering) of the column containing the clear password
     */
    @WithDefault("1")
    int passwordIndex();

    default PasswordKeyMapper toPasswordKeyMapper() {
        return PasswordKeyMapper.builder()
                .setDefaultAlgorithm(CLEAR)
                .setHashColumn(passwordIndex())
                .build();
    }

    String toString();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy