Search in sources :

Example 6 with PasswordAlgorithmFactory

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

the class PasswordAlgorithmFactoryTest method testDefaultPasswordAlgorithm.

@Test
public void testDefaultPasswordAlgorithm() throws Exception {
    final PasswordAlgorithm defaultPasswordAlgorithm = mock(PasswordAlgorithm.class);
    final PasswordAlgorithmFactory passwordAlgorithmFactory = new PasswordAlgorithmFactory(Collections.<String, PasswordAlgorithm>emptyMap(), defaultPasswordAlgorithm);
    assertThat(passwordAlgorithmFactory.defaultPasswordAlgorithm()).isEqualTo(defaultPasswordAlgorithm);
}
Also used : PasswordAlgorithm(org.graylog2.plugin.security.PasswordAlgorithm) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)5 Permissions (org.graylog2.shared.security.Permissions)4 Permission (org.apache.shiro.authz.Permission)1 AllPermission (org.apache.shiro.authz.permission.AllPermission)1 CaseSensitiveWildcardPermission (org.graylog.security.permissions.CaseSensitiveWildcardPermission)1 PasswordAlgorithm (org.graylog2.plugin.security.PasswordAlgorithm)1 PasswordAlgorithmFactory (org.graylog2.security.PasswordAlgorithmFactory)1 BCryptPasswordAlgorithm (org.graylog2.security.hashing.BCryptPasswordAlgorithm)1 UserImpl (org.graylog2.users.UserImpl)1