use of nl.knaw.huygens.security.client.MockAuthenticationHandler in project timbuctoo by HuygensING.
the class LoggedInUsersTest method setUp.
@Before
public void setUp() throws Exception {
Authenticator authenticator = AuthenticatorMockBuilder.authenticator().withPidFor("a", "b", "pid").build();
UserStore userStore = userStore().withUserFor("pid").build();
MockAuthenticationHandler authHandler = new MockAuthenticationHandler();
userStoreWithUserA = new LoggedInUsers(authenticator, userStore, ONE_SECOND_TIMEOUT, x -> {
throw new UnauthorizedException();
});
Authenticator authenticator1 = AuthenticatorMockBuilder.authenticator().withPidFor("a", "b", "pid").withPidFor("c", "d", "otherPid").build();
UserStore userStore1 = userStore().withUserFor("pid").withUserFor("otherPid").build();
userStoreWithUserAAndB = new LoggedInUsers(authenticator1, userStore1, ONE_SECOND_TIMEOUT, x -> {
throw new UnauthorizedException();
});
}
Aggregations