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

io.quarkus.agroal.runtime.AgroalVaultCredentialsProviderPassword Maven / Gradle / Ivy

The newest version!
package io.quarkus.agroal.runtime;

import java.util.Map;
import java.util.Properties;

import io.agroal.api.security.SimplePassword;
import io.quarkus.credentials.CredentialsProvider;

public class AgroalVaultCredentialsProviderPassword extends SimplePassword {

    private CredentialsProvider credentialsProvider;

    public AgroalVaultCredentialsProviderPassword(String credentialsProviderName, CredentialsProvider credentialsProvider) {
        super(credentialsProviderName);
        this.credentialsProvider = credentialsProvider;
    }

    @Override
    public Properties asProperties() {
        Properties properties = new Properties();
        Map credentials = credentialsProvider.getCredentials(getWord());
        credentials.forEach((key, value) -> properties.setProperty(key, value));
        return properties;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy