Search in sources :

Example 1 with CollectionResourceProvider

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);
        }
    }));
}
Also used : STSInstanceStateProvider(org.forgerock.openam.sts.tokengeneration.state.STSInstanceStateProvider) CollectionResourceProvider(org.forgerock.json.resource.CollectionResourceProvider) STSTokenGenerationServiceAuthzModule(org.forgerock.openam.rest.authz.STSTokenGenerationServiceAuthzModule) STSInstanceStateProvider(org.forgerock.openam.sts.tokengeneration.state.STSInstanceStateProvider) Provider(javax.inject.Provider) HttpRouteProvider(org.forgerock.openam.http.HttpRouteProvider) CollectionResourceProvider(org.forgerock.json.resource.CollectionResourceProvider)

Aggregations

Provider (javax.inject.Provider)1 CollectionResourceProvider (org.forgerock.json.resource.CollectionResourceProvider)1 HttpRouteProvider (org.forgerock.openam.http.HttpRouteProvider)1 STSTokenGenerationServiceAuthzModule (org.forgerock.openam.rest.authz.STSTokenGenerationServiceAuthzModule)1 STSInstanceStateProvider (org.forgerock.openam.sts.tokengeneration.state.STSInstanceStateProvider)1