@openid4vc/openid4vci 0.4.5-alpha-20260126081433 → 0.4.5-alpha-20260201123930
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.mjs +5 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ContentType, OpenId4VcBaseError, URL, URLSearchParams, ValidationError, arrayEqualsIgnoreOrder, createZodFetcher, dateToSeconds, encodeToBase64Url, formatZodError, getGlobalConfig, getQueryParams, isResponseContentType, joinUriParts, objectToQueryParams, parseWithErrorHandling, setGlobalConfig, zDataUrl, zHttpsUrl, zInteger, zIs } from "@openid4vc/utils";
|
|
1
|
+
import { ContentType, OpenId4VcBaseError, URL, URLSearchParams, ValidationError, arrayEqualsIgnoreOrder, createZodFetcher, dateToSeconds, encodeToBase64Url, formatZodError, getGlobalConfig, getQueryParams, isResponseContentType, joinUriParts, objectToQueryParams, parseWithErrorHandling, setGlobalConfig, zDataUrl, zHttpsUrl, zInteger, zIs, zNumericDate } from "@openid4vc/utils";
|
|
2
2
|
import { InvalidFetchResponseError, Oauth2AuthorizationServer, Oauth2Client, Oauth2ClientAuthorizationChallengeError, Oauth2Error, Oauth2ErrorCodes, Oauth2JwtVerificationError, Oauth2ServerErrorResponseError, authorizationCodeGrantIdentifier, createClientAttestationJwt, decodeJwt, fetchAuthorizationServerMetadata, fetchWellKnownMetadata, fullySpecifiedCoseAlgorithmArrayToJwaSignatureAlgorithmArray, getAuthorizationServerMetadataFromList, isJwkInSet, jwaSignatureAlgorithmArrayToFullySpecifiedCoseAlgorithmArray, jwtHeaderFromJwtSigner, jwtSignerFromJwt, parseAuthorizationResponseRedirectUrl, preAuthorizedCodeGrantIdentifier, resourceRequest, verifyAuthorizationResponse, verifyJwt, zAuthorizationServerMetadata, zCompactJwt, zJwk, zJwtHeader, zJwtPayload } from "@openid4vc/oauth2";
|
|
3
3
|
import z from "zod";
|
|
4
4
|
|
|
@@ -212,7 +212,7 @@ const zIso18045 = z.enum([
|
|
|
212
212
|
const zIso18045OrStringArray = z.array(z.union([zIso18045, z.string()]));
|
|
213
213
|
const zKeyAttestationJwtPayload = z.object({
|
|
214
214
|
...zJwtPayload.shape,
|
|
215
|
-
iat:
|
|
215
|
+
iat: zNumericDate,
|
|
216
216
|
attested_keys: z.array(zJwk),
|
|
217
217
|
key_storage: z.optional(zIso18045OrStringArray),
|
|
218
218
|
user_authentication: z.optional(zIso18045OrStringArray),
|
|
@@ -221,7 +221,7 @@ const zKeyAttestationJwtPayload = z.object({
|
|
|
221
221
|
const zKeyAttestationJwtPayloadForUse = (use) => z.object({
|
|
222
222
|
...zKeyAttestationJwtPayload.shape,
|
|
223
223
|
nonce: use === "proof_type.attestation" ? z.string({ message: `Nonce must be defined when key attestation is used as 'proof_type.attestation' directly` }) : z.optional(z.string()),
|
|
224
|
-
exp: use === "proof_type.jwt" ?
|
|
224
|
+
exp: use === "proof_type.jwt" ? zNumericDate : z.optional(zNumericDate)
|
|
225
225
|
}).loose();
|
|
226
226
|
|
|
227
227
|
//#endregion
|
|
@@ -937,7 +937,7 @@ const zSignedCredentialIssuerMetadataHeader = z.object({
|
|
|
937
937
|
}).loose();
|
|
938
938
|
const zSignedCredentialIssuerMetadataPayload = z.object({
|
|
939
939
|
...zJwtPayload.shape,
|
|
940
|
-
iat:
|
|
940
|
+
iat: zNumericDate,
|
|
941
941
|
sub: z.string(),
|
|
942
942
|
...zCredentialIssuerMetadataDraft14Draft15V1.shape
|
|
943
943
|
}).loose();
|
|
@@ -1101,7 +1101,7 @@ const zCredentialRequestJwtProofTypeHeader = zJwtHeader.extend({
|
|
|
1101
1101
|
const zCredentialRequestJwtProofTypePayload = z.object({
|
|
1102
1102
|
...zJwtPayload.shape,
|
|
1103
1103
|
aud: z.union([zHttpsUrl, z.array(zHttpsUrl)]),
|
|
1104
|
-
iat:
|
|
1104
|
+
iat: zNumericDate
|
|
1105
1105
|
}).loose();
|
|
1106
1106
|
|
|
1107
1107
|
//#endregion
|