use of org.forgerock.openam.rest.service.RestletRealmRouter in project OpenAM by OpenRock.
the class OAuth2RouterProvider method get.
@Override
public Router get() {
final Router router = new RestletRealmRouter(realmValidator, coreWrapper);
// Standard OAuth2 endpoints
router.attach("/authorize", auditWithOAuthFilter(new AuthorizeEndpointFilter(wrap(AuthorizeResource.class), jacksonRepresentationFactory)));
router.attach("/access_token", auditWithOAuthFilter(new TokenEndpointFilter(new AccessTokenFlowFinder(), jacksonRepresentationFactory), formAuditor(RESPONSE_TYPE, GRANT_TYPE, CLIENT_ID, USERNAME, SCOPE, REDIRECT_URI), jacksonAuditor(SCOPE, TOKEN_TYPE)));
router.attach("/tokeninfo", auditWithOAuthFilter(wrap(ValidationServerResource.class), noBodyAuditor(), jacksonAuditor(SCOPE, TOKEN_TYPE)));
// OAuth 2.0 Token Introspection Endpoint
router.attach("/introspect", auditWithOAuthFilter(wrap(TokenIntrospectionResource.class), formAuditor(TOKEN_TYPE_HINT), jsonAuditor(SCOPE, TOKEN_TYPE, CLIENT_ID, USERNAME, ACTIVE)));
// OpenID Connect endpoints
router.attach("/connect/register", auditWithOAuthFilter(wrap(ConnectClientRegistration.class), jsonAuditor(CLIENT_NAME.getType(), APPLICATION_TYPE.getType(), REDIRECT_URIS.getType()), jacksonAuditor(CLIENT_ID, CLIENT_NAME.getType(), APPLICATION_TYPE.getType(), REDIRECT_URIS.getType())));
router.attach("/userinfo", auditWithOAuthFilter(wrap(UserInfo.class)));
router.attach("/connect/endSession", auditWithOAuthFilter(wrap(EndSession.class)));
router.attach("/connect/jwk_uri", auditWithOAuthFilter(wrap(OpenIDConnectJWKEndpoint.class)));
// Resource Set Registration
Restlet resourceSetRegistrationEndpoint = auditWithOAuthFilter(getRestlet(OAuth2Constants.Custom.RSR_ENDPOINT), jsonAuditor(NAME, SCOPES), jacksonAuditor("_id"));
router.attach("/resource_set/{rsid}", resourceSetRegistrationEndpoint);
router.attach("/resource_set", resourceSetRegistrationEndpoint);
router.attach("/resource_set/", resourceSetRegistrationEndpoint);
// OpenID Connect Discovery
router.attach("/.well-known/openid-configuration", auditWithOAuthFilter(wrap(OpenIDConnectConfiguration.class)));
// OAuth 2 Device Flow
router.attach("/device/user", auditWithOAuthFilter(wrap(DeviceCodeVerificationResource.class)));
router.attach("/device/code", auditWithOAuthFilter(wrap(DeviceCodeResource.class), formAuditor(RESPONSE_TYPE, GRANT_TYPE, CLIENT_ID, SCOPE), noBodyAuditor()));
return router;
}
use of org.forgerock.openam.rest.service.RestletRealmRouter in project OpenAM by OpenRock.
the class XacmlRouterProvider method get.
@Override
public Router get() {
RestletRealmRouter router = new RestletRealmRouter(realmValidator, coreWrapper);
ResourceApiVersionRestlet policiesVersionRouter = new ResourceApiVersionRestlet(versionBehaviourManager);
policiesVersionRouter.attach(version(1), wrap(XacmlService.class));
router.attach("/policies", policiesVersionRouter);
invalidRealmNames.add("policies");
return router;
}
use of org.forgerock.openam.rest.service.RestletRealmRouter in project OpenAM by OpenRock.
the class WebFinger method createInboundRoot.
/**
* Creates the endpoint handler registrations for the OpenId Connect web finger endpoints.
*
* @return {@inheritDoc}
*/
@Override
public Restlet createInboundRoot() {
final Router root = new RestletRealmRouter(realmValidator, coreWrapper);
/**
* For now we only use webfinger for OpenID Connect. Once the standard is finalized
* or we decide to use it for other tasks we dont need a full blown handler
*/
root.attach("/webfinger", auditWithOAuthFilter(new GuicedRestlet(getContext(), OpenIDConnectDiscovery.class)));
return root;
}
use of org.forgerock.openam.rest.service.RestletRealmRouter in project OpenAM by OpenRock.
the class UmaRouterProvider method get.
@Override
public Router get() {
Router router = new RestletRealmRouter(realmValidator, coreWrapper);
router.attach("/permission_request", auditWithUmaFilter(getRestlet(PERMISSION_REQUEST_ENDPOINT), jsonAuditor(RESOURCE_SET_ID, SCOPES), noBodyAuditor()));
router.attach("/authz_request", auditWithUmaFilter(getRestlet(AUTHORIZATION_REQUEST_ENDPOINT), noBodyAuditor(), noBodyAuditor()));
// Well-Known Discovery
router.attach("/.well-known/uma-configuration", auditWithUmaFilter(wrap(UmaWellKnownConfigurationEndpoint.class), noBodyAuditor(), noBodyAuditor()));
return router;
}
Aggregations