Search in sources :

Example 1 with BCryptPasswordAlgorithm

use of org.graylog2.security.hashing.BCryptPasswordAlgorithm in project graylog2-server by Graylog2.

the class MigrationHelpersTest method newUser.

private User newUser(Permissions permissions) {
    final BCryptPasswordAlgorithm passwordAlgorithm = new BCryptPasswordAlgorithm(10);
    final PasswordAlgorithmFactory passwordAlgorithmFactory = new PasswordAlgorithmFactory(Collections.emptyMap(), passwordAlgorithm);
    return new UserImpl(passwordAlgorithmFactory, permissions, ImmutableMap.of());
}
Also used : PasswordAlgorithmFactory(org.graylog2.security.PasswordAlgorithmFactory) BCryptPasswordAlgorithm(org.graylog2.security.hashing.BCryptPasswordAlgorithm) UserImpl(org.graylog2.users.UserImpl)

Aggregations

PasswordAlgorithmFactory (org.graylog2.security.PasswordAlgorithmFactory)1 BCryptPasswordAlgorithm (org.graylog2.security.hashing.BCryptPasswordAlgorithm)1 UserImpl (org.graylog2.users.UserImpl)1