Interface AuthorizationRequest
public interface AuthorizationRequest
Interface to describe custom behavior about handling request during
/authorize and /par.-
Field Summary
FieldsModifier and TypeFieldDescriptionDefault allowed request parameters.static final StringName of the parameter to locate the request object. -
Method Summary
Modifier and TypeMethodDescriptionRetrieves a parameter from the HTTP Request.default Promise<Void,AuthorizationRequestException> Because FAPI requires the use of a JWT-Secured Authorized Request (JAR) in accordance with RFC 9101.removeExtraParameters(Set<String> paramNamesToKeep) Implementation which removes parameter values that don't match an entry in paramNamesToKeep from the Request's Parameters.
-
Field Details
-
REQUEST_JWT_PARAM_NAME
Name of the parameter to locate the request object.- See Also:
-
ALLOWED_REQUEST_PARAMETER_NAMES
Default allowed request parameters.
-
-
Method Details
-
findRequestObject
Promise<Optional<String>,AuthorizationRequestException> findRequestObject()Retrieves a parameter from the HTTP Request.- Returns:
Promisewhich returns the param value as a String or an empty optional if the param does not exist or fails to be retrieved due to an exception.
-
removeExtraParameters
Because FAPI requires the use of a JWT-Secured Authorized Request (JAR) in accordance with RFC 9101. That rfc states in section 6.3 of the RFC that:The authorization server MUST extract the set of authorization request parameters from the Request Object value. The authorization server MUST only use the parameters in the Request Object, even if the same parameter is provided in the query parameter.
This means that any parameters supplied with the request (both /par and /authorize requests) should ignore any parameters provided with the request, and use only the parameters supplied in the JAR object. The exceptions to the rule are those elements of the request required for the client authorization method, e.g.client_idfortls_client_authtype requests andclient_assertionandclient_assertion_typeforprivate_key_jwtrequests.This method removes all parameters except the following;
client_idclient_assertionclient_assertion_typerequest_urirequest
Due to issues in AM, this method will also leave the following parameters, although it shouldn't have to:
scoperesponse_type
- Returns:
- a
Promisethat will resolve when the method has completed
-
removeExtraParameters
Implementation which removes parameter values that don't match an entry in paramNamesToKeep from the Request's Parameters.- Parameters:
paramNamesToKeep- the set of HTTP Request parameters to keep- Returns:
Promise
-