use of org.forgerock.selfservice.core.snapshot.SnapshotTokenHandlerFactory in project OpenAM by OpenRock.
the class SelfServiceGuiceModule method configure.
@Override
protected void configure() {
install(new FactoryModuleBuilder().implement(SnapshotTokenHandlerFactory.class, JwtSnapshotTokenHandlerFactory.class).build(new TypeLiteral<KeyPairInjector<SnapshotTokenHandlerFactory>>() {
}));
bind(ProcessStore.class).to(ProcessStoreImpl.class);
bind(ServiceConfigProviderFactory.class).to(ServiceConfigProviderFactoryImpl.class);
bind(SelfServiceFactory.class).to(SelfServiceFactoryImpl.class);
bind(KbaResource.class);
try {
bind(Client.class).annotatedWith(SelfService.class).toInstance(new Client(new HttpClientHandler()));
} catch (HttpApplicationException haE) {
throw new HttpClientCreationException("Unable to create http client", haE);
}
// Registration CREST services
expose(new TypeLiteral<SelfServiceRequestHandler<UserRegistrationConsoleConfig>>() {
});
expose(new TypeLiteral<SelfServiceRequestHandler<ForgottenPasswordConsoleConfig>>() {
});
expose(new TypeLiteral<SelfServiceRequestHandler<ForgottenUsernameConsoleConfig>>() {
});
expose(UserUpdateService.class);
expose(KbaResource.class);
// Exposed to be accessible to custom progress stages
expose(ConnectionFactory.class).annotatedWith(SelfService.class);
expose(Client.class).annotatedWith(SelfService.class);
}
use of org.forgerock.selfservice.core.snapshot.SnapshotTokenHandlerFactory in project OpenAM by OpenRock.
the class SelfServiceFactoryImpl method getService.
@Override
public RequestHandler getService(String realm, ProcessInstanceConfig serviceConfig) {
KeyPairProvider keyPairProvider = keyPairProviderFactory.getProvider(realm);
SnapshotTokenHandlerFactory tokenHandlerFactory = keyPairInjector.getInjectedWith(keyPairProvider);
ClassLoader classLoader = getClass().getClassLoader();
return new AnonymousProcessService(serviceConfig, stageProvider, tokenHandlerFactory, processStore, classLoader);
}
Aggregations