use of org.forgerock.json.resource.CollectionResourceProvider in project OpenAM by OpenRock.
the class TokenGenerationServiceHttpRouteProvider method get.
@Override
public Set<HttpRoute> get() {
return Collections.singleton(HttpRoute.newHttpRoute(STARTS_WITH, "sts-tokengen", new Provider<Handler>() {
@Override
public Handler get() {
CollectionResourceProvider tokenGenerationService = new TokenGenerationService(TokenGenerationServiceInjectorHolder.getInstance(Key.get(SAML2TokenGeneration.class)), TokenGenerationServiceInjectorHolder.getInstance(Key.get(OpenIdConnectTokenGeneration.class)), TokenGenerationServiceInjectorHolder.getInstance(Key.get(new TypeLiteral<STSInstanceStateProvider<RestSTSInstanceState>>() {
})), TokenGenerationServiceInjectorHolder.getInstance(Key.get(new TypeLiteral<STSInstanceStateProvider<SoapSTSInstanceState>>() {
})), TokenGenerationServiceInjectorHolder.getInstance(Key.get(CTSTokenPersistence.class)), TokenGenerationServiceInjectorHolder.getInstance(Key.get(Logger.class)));
rootRouter.route("").auditAs(STS).authorizeWith(STSTokenGenerationServiceAuthzModule.class).toCollection(tokenGenerationService);
return Handlers.chainOf(newHttpHandler(rootRouter.getRouter()), authenticationFilter);
}
}));
}
Aggregations