use of org.forgerock.openam.audit.AuditConstants.Component in project OpenAM by OpenRock.
the class CoreRestGuiceModule method configure.
@Override
protected void configure() {
install(new FactoryModuleBuilder().implement(SmsRequestHandler.class, SmsRequestHandler.class).build(SmsRequestHandlerFactory.class));
install(new FactoryModuleBuilder().implement(SmsCollectionProvider.class, SmsCollectionProvider.class).build(SmsCollectionProviderFactory.class));
install(new FactoryModuleBuilder().implement(SmsSingletonProvider.class, SmsSingletonProvider.class).build(SmsSingletonProviderFactory.class));
install(new FactoryModuleBuilder().implement(SmsGlobalSingletonProvider.class, SmsGlobalSingletonProvider.class).build(SmsGlobalSingletonProviderFactory.class));
bind(DebugRecorder.class).to(DefaultDebugRecorder.class);
MapBinder<RouteMatcher<Request>, Handler> chfEndpointHandlers = newMapBinder(binder(), new TypeLiteral<RouteMatcher<Request>>() {
}, new TypeLiteral<Handler>() {
});
chfEndpointHandlers.addBinding(requestUriMatcher(EQUALS, "authenticate")).to(Key.get(Handler.class, Names.named("AuthenticateHandler")));
MapBinder<Component, AbstractHttpAccessAuditFilter> httpAccessAuditFilterMapBinder = newMapBinder(binder(), Component.class, AbstractHttpAccessAuditFilter.class);
httpAccessAuditFilterMapBinder.addBinding(AUTHENTICATION).to(AuthenticationAccessAuditFilter.class);
Multibinder<UiRolePredicate> userUiRolePredicates = Multibinder.newSetBinder(binder(), UiRolePredicate.class);
userUiRolePredicates.addBinding().to(SelfServiceUserUiRolePredicate.class);
userUiRolePredicates.addBinding().to(GlobalAdminUiRolePredicate.class);
userUiRolePredicates.addBinding().to(RealmAdminUiRolePredicate.class);
MapBinder<MatchingResourcePath, CrestAuthorizationModule> smsGlobalAuthzModuleBinder = MapBinder.newMapBinder(binder(), MatchingResourcePath.class, CrestAuthorizationModule.class);
smsGlobalAuthzModuleBinder.addBinding(resourcePath("realms")).to(AnyPrivilegeAuthzModule.class);
smsGlobalAuthzModuleBinder.addBinding(resourcePath("authentication/modules/*")).to(PrivilegeWriteAndAnyPrivilegeReadOnlyAuthzModule.class);
smsGlobalAuthzModuleBinder.addBinding(resourcePath("services/scripting")).to(PrivilegeWriteAndAnyPrivilegeReadOnlyAuthzModule.class);
smsGlobalAuthzModuleBinder.addBinding(resourcePath("services/scripting/contexts")).to(PrivilegeWriteAndAnyPrivilegeReadOnlyAuthzModule.class);
}
Aggregations