use of com.predic8.membrane.core.interceptor.authentication.session.StaticUserDataProvider in project service-proxy by membrane.
the class BasicAuthenticationInterceptorIntegrationTest method testHashedPassword.
@Test
public void testHashedPassword() throws Exception {
List<User> users = new ArrayList<User>();
User user = new User("admin", "$6$12345678$jwCsYagMo/KNcTDqnrWL25Dy3AfAT5U94abA5a/iPFO.Cx2zAkMpPxZBNKY/P/xiRrCfCFDxdBp7pvNEMoBcr0");
users.add(user);
BasicAuthenticationInterceptor interceptor = new BasicAuthenticationInterceptor();
StaticUserDataProvider provider = (StaticUserDataProvider) interceptor.getUserDataProvider();
interceptor.setUsers(users);
User postData = new User("admin", "admin");
try {
provider.verify(postData.getAttributes());
} catch (Exception e) {
fail();
}
}
use of com.predic8.membrane.core.interceptor.authentication.session.StaticUserDataProvider in project service-proxy by membrane.
the class OAuth2AuthorizationServerInterceptorBase method setOasiUserDataProvider.
private void setOasiUserDataProvider() {
StaticUserDataProvider udp = new StaticUserDataProvider();
ArrayList<StaticUserDataProvider.User> users = new ArrayList<StaticUserDataProvider.User>();
johnsUserData = new StaticUserDataProvider.User("john", "password");
johnsUserData.getAttributes().put("email", "e@mail.com");
users.add(johnsUserData);
udp.setUsers(users);
oasi.setUserDataProvider(udp);
}
Aggregations