io.agroal.api.security.SimplePassword Java Examples

The following examples show how to use io.agroal.api.security.SimplePassword. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AgroalDataSourceFactory.java    From kumuluzee with MIT License 5 votes vote down vote up
private static void setDatabaseCredentials(AgroalConnectionFactoryConfigurationSupplier connectionFactory, String username, String password) {
    if (!StringUtils.isNullOrEmpty( username )) {
        connectionFactory.principal(new NamePrincipal( username ));
    }

    if (!StringUtils.isNullOrEmpty( password )) {
        connectionFactory.credential(new SimplePassword( password ));
    }
}