use of org.apache.jackrabbit.oak.spi.security.user.UserIdCredentials in project jackrabbit-oak by apache.
the class SystemUserImplTest method testGetCredentials.
@Test
public void testGetCredentials() throws Exception {
User user = createUser(null);
Credentials creds = user.getCredentials();
assertTrue(creds instanceof UserIdCredentials);
UserIdCredentials impl = (UserIdCredentials) creds;
assertEquals(uid, impl.getUserId());
}
use of org.apache.jackrabbit.oak.spi.security.user.UserIdCredentials in project jackrabbit-oak by apache.
the class UserImplTest method testGetCredentialsUserWithoutPassword.
@Test
public void testGetCredentialsUserWithoutPassword() throws Exception {
user = userMgr.createUser(uid, null);
root.commit();
Credentials creds = user.getCredentials();
assertTrue(creds instanceof UserIdCredentials);
assertEquals(uid, ((UserIdCredentials) creds).getUserId());
}
Aggregations