@openid4vc/oauth2 0.3.0-alpha-20250328114752 → 0.3.0-alpha-20250329201438
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.d.mts +9 -9
- package/dist/index.d.ts +9 -9
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -925,7 +925,7 @@ var zAuthorizationServerMetadata = z8.object({
|
|
|
925
925
|
// FiPA (no RFC yet)
|
|
926
926
|
authorization_challenge_endpoint: z8.optional(zHttpsUrl2),
|
|
927
927
|
// From OpenID4VCI specification
|
|
928
|
-
|
|
928
|
+
"pre-authorized_grant_anonymous_access_supported": z8.optional(z8.boolean()),
|
|
929
929
|
// Attestation Based Client Auth (draft 5)
|
|
930
930
|
client_attestation_pop_nonce_required: z8.boolean().optional()
|
|
931
931
|
}).passthrough().refine(
|
|
@@ -1634,7 +1634,7 @@ function clientAuthenticationDynamic(options) {
|
|
|
1634
1634
|
const { url, authorizationServerMetadata, body } = callbackOptions;
|
|
1635
1635
|
const endpointType = url === authorizationServerMetadata.introspection_endpoint ? "introspection" : url === authorizationServerMetadata.token_endpoint ? "token" : "endpoint";
|
|
1636
1636
|
const method = getSupportedClientAuthenticationMethod(authorizationServerMetadata, endpointType);
|
|
1637
|
-
if (endpointType === "token" && body.grant_type === preAuthorizedCodeGrantIdentifier && authorizationServerMetadata
|
|
1637
|
+
if (endpointType === "token" && body.grant_type === preAuthorizedCodeGrantIdentifier && authorizationServerMetadata["pre-authorized_grant_anonymous_access_supported"]) {
|
|
1638
1638
|
return clientAuthenticationAnonymous()(callbackOptions);
|
|
1639
1639
|
}
|
|
1640
1640
|
if (method === "client_secret_basic" /* ClientSecretBasic */) {
|
|
@@ -2265,7 +2265,7 @@ async function verifyAuthorizationRequestClientAttestation(options, authorizatio
|
|
|
2265
2265
|
return void 0;
|
|
2266
2266
|
}
|
|
2267
2267
|
throw new Oauth2ServerErrorResponseError({
|
|
2268
|
-
error: "
|
|
2268
|
+
error: "invalid_client" /* InvalidClient */,
|
|
2269
2269
|
error_description: `Missing required client attestation parameters in pushed authorization request. Make sure to provide the '${oauthClientAttestationHeader}' and '${oauthClientAttestationPopHeader}' header values.`
|
|
2270
2270
|
});
|
|
2271
2271
|
}
|