Skip to content

features.requestObjects

OIDC Core 1.0 and RFC9101 - Passing a Request Object by Value (JAR)

Specifies whether Request Object capabilities shall be enabled. When enabled, the authorization server shall support the use and validation of the request parameter for conveying authorization request parameters as JSON Web Tokens, providing enhanced security and integrity protection for authorization requests.

default value:

{
assertJwtClaimsAndHeader: [AsyncFunction: assertJwtClaimsAndHeader], // see expanded details below
enabled: false,
requireSignedRequestObject: false
}
(Click to expand) features.requestObjects options details

Specifies a helper function that shall be invoked to perform additional validation of the Request Object JWT Claims Set and Header beyond the standard JAR specification requirements. This function enables enforcement of deployment-specific policies, security constraints, or extended validation logic according to authorization server requirements.

default value:

async function assertJwtClaimsAndHeader(ctx, claims, header, client) {
// @param ctx - koa request context
// @param claims - parsed Request Object JWT Claims Set as object
// @param header - parsed Request Object JWT Headers as object
// @param client - the Client instance
const requiredClaims = [];
const fapiProfile = ctx.oidc.isFapi('1.0 Final', '2.0');
if (fapiProfile) {
requiredClaims.push('exp', 'aud', 'nbf');
}
if (ctx.oidc.route === 'backchannel_authentication') {
requiredClaims.push('exp', 'iat', 'nbf', 'jti');
}
for (const claim of new Set(requiredClaims)) {
if (claims[claim] === undefined) {
throw new errors.InvalidRequestObject(
`Request Object is missing the '${claim}' claim`,
);
}
}
if (fapiProfile) {
const diff = claims.exp - claims.nbf;
if (Math.sign(diff) !== 1 || diff > 3600) {
throw new errors.InvalidRequestObject(
"Request Object 'exp' claim too far from 'nbf' claim",
);
}
}
}

Specifies whether the use of signed request objects shall be mandatory for all authorization requests as an authorization server security policy. When enabled, the authorization server shall reject authorization requests that do not include a signed Request Object JWT.

default value:

false