@absolutejs/auth 0.41.0 → 0.42.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -6170,6 +6170,9 @@ var oidcProviderRoutes = (config) => {
6170
6170
  if (mtlsResult !== undefined)
6171
6171
  return mtlsResult;
6172
6172
  const clientSecret = bodyClientSecret ?? basicClientSecret;
6173
+ if (config.strictFapi === true && clientSecret !== undefined) {
6174
+ return;
6175
+ }
6173
6176
  const client = await authenticateClient(clientId, clientSecret);
6174
6177
  return client === undefined ? undefined : { client, clientCertThumbprint: undefined };
6175
6178
  };
@@ -6390,7 +6393,7 @@ var oidcProviderRoutes = (config) => {
6390
6393
  subject_types_supported: ["public"],
6391
6394
  tls_client_certificate_bound_access_tokens: true,
6392
6395
  token_endpoint: tokenUrl,
6393
- token_endpoint_auth_methods_supported: [
6396
+ token_endpoint_auth_methods_supported: config.strictFapi === true ? ["private_key_jwt", "self_signed_tls_client_auth"] : [
6394
6397
  "client_secret_basic",
6395
6398
  "client_secret_post",
6396
6399
  "none",
@@ -6403,6 +6406,9 @@ var oidcProviderRoutes = (config) => {
6403
6406
  if (config.deviceAuthorizationStore) {
6404
6407
  discovery.device_authorization_endpoint = `${issuer}${deviceAuthorizationRoute}`;
6405
6408
  }
6409
+ if (config.strictFapi === true) {
6410
+ discovery.require_pushed_authorization_requests = true;
6411
+ }
6406
6412
  if (config.backchannelAuthStore) {
6407
6413
  discovery.backchannel_authentication_endpoint = `${issuer}${backchannelAuthorizationRoute}`;
6408
6414
  discovery.backchannel_token_delivery_modes_supported = ["poll"];
@@ -6515,7 +6521,8 @@ var oidcProviderRoutes = (config) => {
6515
6521
  params2.state = state;
6516
6522
  return respondToClient(redirectUri, responseMode, params2);
6517
6523
  };
6518
- if (client.requirePushedAuthorizationRequests === true && query.request_uri === undefined) {
6524
+ const requirePar = client.requirePushedAuthorizationRequests === true || config.strictFapi === true;
6525
+ if (requirePar && query.request_uri === undefined) {
6519
6526
  return errorRedirect("invalid_request");
6520
6527
  }
6521
6528
  if (client.requireSignedRequestObject === true && query.request === undefined && query.request_uri === undefined) {
@@ -26180,5 +26187,5 @@ export {
26180
26187
  AuthIdentityConflictError
26181
26188
  };
26182
26189
 
26183
- //# debugId=3861326B7894F72964756E2164756E21
26190
+ //# debugId=02ED8EE4D0AFE4F564756E2164756E21
26184
26191
  //# sourceMappingURL=index.js.map