Class RegistrationRequestFilter
- All Implemented Interfaces:
Filter
RegistrationRequest object that contains a SoftwareStatement from
the body of a request to the /register endpoint.
This filter ensures that the following conditions of the FAPI spec are met:
-
Financial-grade API Security Profile 1.0 - Part 2: Advanced, section 5.2.2 (2) states:
- the response_type value code id_token, or
- the response_type value code in conjunction with the response_mode value jwt;
-
Financial-grade API Security Profile 1.0 - Part 2: Advanced , section 8.6 requires:
- For JWS, both clients and authorization servers:
- shall use PS256 or ES256 algorithms;
- should not use algorithms that use RSASSA-PKCS1-v1_5 (e.g. RS256); and
- shall not use none
- For JWS, both clients and authorization servers:
- Financial-grade API Security Profile 1.0 - Part 2: Advanced, section 5.2.2 (14) states:
-
Financial-grade API Security Profile 1.0 - Part 1: Baseline states:
- 5.2.2 (8): shall require redirect URIs to be pre-registered;
- 5.2.2 (9): shall require the redirect_uri in the authorization request;
- 5.2.2 (20): shall require redirect URIs to use the https scheme;
As an additional restriction, this filter also forbids the 'redirect_uri' from redirecting to localhost.
If the RegistrationRequest can successfully be built then a dedicated RegistrationRequestFapiContext
is created for use by subsequent filters.
This filter is not expected to be instantiated directly as it is managed as part of the core FAPI Filter
chain FapiDcrFilterChainHeaplet.
-
Constructor Summary
ConstructorsConstructorDescriptionRegistrationRequestFilter(RegistrationRequestFactory registrationRequestFactory, Set<String> supportedSigningAlgorithms, Set<String> supportedTokenEndpointAuthMethods, Set<String> registrationObjectSigningFieldNames, boolean applyOpenBankingRolesBasedScopeValidation) RegistrationRequestFilterconstructor, though this filter shouldn't be initiated directly as it is managed as part ofFapiDcrFilterChainHeaplet. -
Method Summary
-
Constructor Details
-
RegistrationRequestFilter
public RegistrationRequestFilter(RegistrationRequestFactory registrationRequestFactory, Set<String> supportedSigningAlgorithms, Set<String> supportedTokenEndpointAuthMethods, Set<String> registrationObjectSigningFieldNames, boolean applyOpenBankingRolesBasedScopeValidation) RegistrationRequestFilterconstructor, though this filter shouldn't be initiated directly as it is managed as part ofFapiDcrFilterChainHeaplet.- Parameters:
registrationRequestFactory- used to create aRegistrationRequestfrom the JWT extracted from the request payloadsupportedSigningAlgorithms- the JWS signing algorithms supported by FAPIsupportedTokenEndpointAuthMethods- the registration request object's token_endpoint_auth_method values which are allowed by FAPIregistrationObjectSigningFieldNames- fields within the registration request object to validate against thesupportedSigningAlgorithmsapplyOpenBankingRolesBasedScopeValidation- Set to true if Open Banking roles-based scope validation should be applied.
-
-
Method Details
-
filter
public Promise<Response,NeverThrowsException> filter(Context context, Request request, Handler next) Description copied from interface:FilterFilters the request and/or response of an exchange. To pass the request to the next filter or handler in the chain, the filter callsnext.handle(context, request).This method may elect not to pass the request to the next filter or handler, and instead handle the request itself. It can achieve this by merely avoiding a call to
next.handle(context, request)and creating its own response object. The filter is also at liberty to replace a response with another of its own by intercepting the response returned by the next handler.
-