io.gravitee.am.identityprovider.jdbc.configuration.JdbcIdentityProviderConfiguration Maven / Gradle / Ivy
The newest version!
/**
* Copyright (C) 2015 The Gravitee team (http://gravitee.io)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.gravitee.am.identityprovider.jdbc.configuration;
import io.gravitee.am.common.password.PasswordSaltFormat;
import io.gravitee.am.identityprovider.api.IdentityProviderConfiguration;
import io.gravitee.am.identityprovider.jdbc.utils.PasswordEncoder;
import io.gravitee.am.repository.jdbc.provider.R2DBCConnectionConfiguration;
import io.gravitee.am.service.authentication.crypto.password.PasswordEncoderOptions;
import java.util.List;
import java.util.Map;
/**
* @author Titouan COMPIEGNE (titouan.compiegne at graviteesource.com)
* @author GraviteeSource Team
*/
public class JdbcIdentityProviderConfiguration implements IdentityProviderConfiguration, R2DBCConnectionConfiguration {
public static final String FIELD_ID = "id";
public static final String FIELD_USERNAME = "username";
public static final String FIELD_PASSWORD = "password";
public static final String FIELD_EMAIL = "email";
public static final String FIELD_METADATA = "metadata";
private String host;
private Integer port;
private String protocol;
private String database;
private String usersTable = "users";
private String user;
private String password;
private String selectUserByUsernameQuery;
private String selectUserByMultipleFieldsQuery;
private String selectUserByEmailQuery;
private String identifierAttribute = FIELD_ID;
private String emailAttribute = FIELD_EMAIL;
private String usernameAttribute = FIELD_USERNAME;
private String passwordAttribute = FIELD_PASSWORD;
private String passwordEncoder = PasswordEncoder.BCRYPT;
private String passwordEncoding = "Base64";
private boolean useDedicatedSalt;
private String passwordSaltAttribute = "salt";
private Integer passwordSaltLength = 32;
private String passwordSaltFormat = PasswordSaltFormat.DIGEST;
private List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy