use of org.forgerock.openam.sts.InstanceConfigMarshaller in project OpenAM by OpenRock.
the class STSPublishServiceHttpRouteProvider method getHandler.
private Handler getHandler() {
final RequestHandler restPublishRequestHandler = new RestSTSPublishServiceRequestHandler(STSPublishInjectorHolder.getInstance(Key.get(RestSTSInstancePublisher.class)), STSPublishInjectorHolder.getInstance(Key.get(RestRealmValidator.class)), STSPublishInjectorHolder.getInstance(Key.get(new TypeLiteral<InstanceConfigMarshaller<RestSTSInstanceConfig>>() {
})), STSPublishInjectorHolder.getInstance(Key.get(Logger.class)));
rootRouter.route("rest").auditAs(STS).authorizeWith(STSPublishServiceAuthzModule.class).toRequestHandler(STARTS_WITH, restPublishRequestHandler);
final RequestHandler soapPublishRequestHandler = new SoapSTSPublishServiceRequestHandler(STSPublishInjectorHolder.getInstance(Key.get(SoapSTSInstancePublisher.class)), STSPublishInjectorHolder.getInstance(Key.get(RestRealmValidator.class)), STSPublishInjectorHolder.getInstance(Key.get(new TypeLiteral<InstanceConfigMarshaller<SoapSTSInstanceConfig>>() {
})), STSPublishInjectorHolder.getInstance(Key.get(Logger.class)));
rootRouter.route("soap").auditAs(STS).authorizeWith(STSPublishServiceAuthzModule.class).toRequestHandler(STARTS_WITH, soapPublishRequestHandler);
return Handlers.chainOf(newHttpHandler(rootRouter.getRouter()), authenticationFilter);
}
Aggregations