Search in sources :

Example 1 with InstanceConfigMarshaller

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);
}
Also used : RequestHandler(org.forgerock.json.resource.RequestHandler) InstanceConfigMarshaller(org.forgerock.openam.sts.InstanceConfigMarshaller) STSPublishServiceAuthzModule(org.forgerock.openam.rest.authz.STSPublishServiceAuthzModule)

Aggregations

RequestHandler (org.forgerock.json.resource.RequestHandler)1 STSPublishServiceAuthzModule (org.forgerock.openam.rest.authz.STSPublishServiceAuthzModule)1 InstanceConfigMarshaller (org.forgerock.openam.sts.InstanceConfigMarshaller)1