@pagopa/io-wallet-oid4vci 1.5.2 → 1.5.3
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 -2
- package/dist/index.d.ts +9 -2
- package/dist/index.js +11 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
|
@@ -956,7 +956,8 @@ interface ParsedCredentialRequest {
|
|
|
956
956
|
* @param options - Parsing options and validation context.
|
|
957
957
|
* @returns Promise resolving to the normalized parsed credential request including the extracted `accessToken` and `dpopProof`.
|
|
958
958
|
* @throws {CredentialAuthorizationHeaderError} If the `Authorization` header is absent or invalid.
|
|
959
|
-
* @throws {
|
|
959
|
+
* @throws {MissingDpopProofError} If the `DPoP` header is absent.
|
|
960
|
+
* @throws {InvalidDpopProofError} If the `DPoP` header is present but not a valid compact JWT.
|
|
960
961
|
* @throws {ValidationError} If request body schema or semantic checks fail.
|
|
961
962
|
* @throws {Oauth2JwtParseError} If a proof JWT cannot be decoded.
|
|
962
963
|
* @throws {ParseCredentialRequestError} For unexpected parsing failures.
|
|
@@ -1539,6 +1540,12 @@ declare class CredentialOfferError extends Oid4vciError {
|
|
|
1539
1540
|
declare class MissingDpopProofError extends Oid4vciError {
|
|
1540
1541
|
constructor(message?: string, options?: ErrorOptions);
|
|
1541
1542
|
}
|
|
1543
|
+
/**
|
|
1544
|
+
* Error thrown when a credential request has an invalid DPoP proof header.
|
|
1545
|
+
*/
|
|
1546
|
+
declare class InvalidDpopProofError extends Oid4vciError {
|
|
1547
|
+
constructor(message?: string, options?: ErrorOptions);
|
|
1548
|
+
}
|
|
1542
1549
|
/**
|
|
1543
1550
|
* Error thrown when a credential request has a missing or invalid Authorization header.
|
|
1544
1551
|
*/
|
|
@@ -14215,4 +14222,4 @@ declare class WalletProvider {
|
|
|
14215
14222
|
createItWalletAttestationJwt(options: WalletAttestationOptions): Promise<string>;
|
|
14216
14223
|
}
|
|
14217
14224
|
|
|
14218
|
-
export { type AuthorizationCodeGrant, type AuthorizationCodeGrantV1_3, type AuthorizationCodeGrantV1_4, type AuthorizationResponse, type BaseCredentialRequestOptions, type CompleteAuthorizationOptions, type CompleteAuthorizationResult, CreateCredentialResponseError, type CreateCredentialResponseOptions, type CreateCredentialResponseOptionsV1_0, type CreateCredentialResponseOptionsV1_3, type CreateCredentialResponseOptionsV1_4, type CreateCredentialResponseResult, type CreateCredentialResponseResultWithFlow, CredentialAuthorizationHeaderError, type CredentialObject, type CredentialOffer, CredentialOfferError, type CredentialOfferGrants, type CredentialOfferGrantsV1_3, type CredentialOfferGrantsV1_4, type CredentialOfferUri, type CredentialOfferV1_3, type CredentialOfferV1_4, type CredentialRequest, type CredentialRequestOptions, type CredentialRequestOptionsV1_0, type CredentialRequestOptionsV1_3, type CredentialRequestOptionsV1_4, type CredentialRequestV1_0, type CredentialRequestV1_3, type CredentialResponse, type CredentialResponseEncryption, type CredentialResponseV1_0, type CredentialResponseV1_3, type DeferredCredentialResponseV1_0, type DeferredCredentialResponseV1_3, type DeferredFlowOptionsV1_0, type DeferredFlowOptionsV1_3, type ExtractGrantDetailsOptions, type ExtractGrantDetailsOptionsV1_3, type ExtractGrantDetailsOptionsV1_4, type ExtractGrantDetailsResult, type ExtractGrantDetailsResultV1_3, type ExtractGrantDetailsResultV1_4, FetchCredentialResponseError, type FetchCredentialResponseOptions, FetchMetadataError, type FetchMetadataOptions, type FetchStatusListCallback, type ImmediateCredentialResponse, type ImmediateFlowOptions, type KeyAttestationHeader, type KeyAttestationOptions, type KeyAttestationPayload, type KeyAttestationStatus, type MetadataResponse, type MetadataResponseV1_0, type MetadataResponseV1_3, MissingDpopProofError, NonceRequestError, Oid4vciError, type ParseCredentialOfferUriOptions, ParseCredentialRequestError, type ParseCredentialRequestExpectedValues, type ParseCredentialRequestOptions, type ParsedCredentialProof, type ParsedCredentialRequest, type ProofJwtHeader, type ProofJwtHeaderV1_0, type ProofJwtHeaderV1_3, type ProofJwtPayload, type ResolveCredentialOfferOptions, type ResolveCredentialOfferOptionsV1_3, type ResolveCredentialOfferOptionsV1_4, type SendAuthorizationResponseAndExtractCodeOptions, type StatusList, type ValidateCredentialOfferOptions, type ValidateCredentialOfferOptionsV1_3, type ValidateCredentialOfferOptionsV1_4, type VerifyAuthorizationResponseFormPostJWTOptions, type VerifyAuthorizationResponseOptions, type VerifyCredentialRequestJwtProofBaseOptions, VerifyCredentialRequestJwtProofError, type VerifyCredentialRequestJwtProofOptions, type VerifyCredentialRequestJwtProofOptionsV1_0, type VerifyCredentialRequestJwtProofOptionsV1_3, type VerifyCredentialRequestJwtProofOptionsV1_4, type VerifyCredentialRequestJwtProofResult, type VerifyCredentialRequestJwtProofResultV1_0, type VerifyCredentialRequestJwtProofResultV1_3, type VerifyCredentialRequestJwtProofResultV1_4, VerifyKeyAttestationJwtError, type VerifyKeyAttestationJwtOptions, type VerifyKeyAttestationJwtResult, type WalletAttestationOptions, WalletProvider, WalletProviderError, completeAuthorization, createCredentialRequest, createCredentialResponse, extractGrantDetails, fetchCredentialResponse, fetchMetadata, keyAttestationTypeHeader, parseCredentialOfferUri, parseCredentialRequest, resolveCredentialOffer, sendAuthorizationResponseAndExtractCode, validateCredentialOffer, verifyAuthorizationResponse, verifyAuthorizationResponseFormPostJWT, verifyCredentialRequestJwtProof, verifyKeyAttestationJwt, zAuthorizationCodeGrantV1_3, zAuthorizationCodeGrantV1_4, zAuthorizationResponse, zCredentialObject, zCredentialOfferGrantsV1_3, zCredentialOfferGrantsV1_4, zCredentialOfferV1_3, zCredentialOfferV1_4, zCredentialRequestV1_0, zCredentialRequestV1_3, zCredentialResponseEncryption, zCredentialResponseV1_0, zCredentialResponseV1_3, zDeferredCredentialResponseV1_0, zDeferredCredentialResponseV1_3, zImmediateCredentialResponse, zKeyAttestationAlg, zKeyAttestationHeader, zKeyAttestationPayload, zKeyAttestationStatus, zKeyAttestationTypeHeader, zMetadataResponse, zMetadataResponseV1_0, zMetadataResponseV1_3, zProofJwtHeaderV1_0, zProofJwtHeaderV1_3, zProofJwtPayload, zStatusList };
|
|
14225
|
+
export { type AuthorizationCodeGrant, type AuthorizationCodeGrantV1_3, type AuthorizationCodeGrantV1_4, type AuthorizationResponse, type BaseCredentialRequestOptions, type CompleteAuthorizationOptions, type CompleteAuthorizationResult, CreateCredentialResponseError, type CreateCredentialResponseOptions, type CreateCredentialResponseOptionsV1_0, type CreateCredentialResponseOptionsV1_3, type CreateCredentialResponseOptionsV1_4, type CreateCredentialResponseResult, type CreateCredentialResponseResultWithFlow, CredentialAuthorizationHeaderError, type CredentialObject, type CredentialOffer, CredentialOfferError, type CredentialOfferGrants, type CredentialOfferGrantsV1_3, type CredentialOfferGrantsV1_4, type CredentialOfferUri, type CredentialOfferV1_3, type CredentialOfferV1_4, type CredentialRequest, type CredentialRequestOptions, type CredentialRequestOptionsV1_0, type CredentialRequestOptionsV1_3, type CredentialRequestOptionsV1_4, type CredentialRequestV1_0, type CredentialRequestV1_3, type CredentialResponse, type CredentialResponseEncryption, type CredentialResponseV1_0, type CredentialResponseV1_3, type DeferredCredentialResponseV1_0, type DeferredCredentialResponseV1_3, type DeferredFlowOptionsV1_0, type DeferredFlowOptionsV1_3, type ExtractGrantDetailsOptions, type ExtractGrantDetailsOptionsV1_3, type ExtractGrantDetailsOptionsV1_4, type ExtractGrantDetailsResult, type ExtractGrantDetailsResultV1_3, type ExtractGrantDetailsResultV1_4, FetchCredentialResponseError, type FetchCredentialResponseOptions, FetchMetadataError, type FetchMetadataOptions, type FetchStatusListCallback, type ImmediateCredentialResponse, type ImmediateFlowOptions, InvalidDpopProofError, type KeyAttestationHeader, type KeyAttestationOptions, type KeyAttestationPayload, type KeyAttestationStatus, type MetadataResponse, type MetadataResponseV1_0, type MetadataResponseV1_3, MissingDpopProofError, NonceRequestError, Oid4vciError, type ParseCredentialOfferUriOptions, ParseCredentialRequestError, type ParseCredentialRequestExpectedValues, type ParseCredentialRequestOptions, type ParsedCredentialProof, type ParsedCredentialRequest, type ProofJwtHeader, type ProofJwtHeaderV1_0, type ProofJwtHeaderV1_3, type ProofJwtPayload, type ResolveCredentialOfferOptions, type ResolveCredentialOfferOptionsV1_3, type ResolveCredentialOfferOptionsV1_4, type SendAuthorizationResponseAndExtractCodeOptions, type StatusList, type ValidateCredentialOfferOptions, type ValidateCredentialOfferOptionsV1_3, type ValidateCredentialOfferOptionsV1_4, type VerifyAuthorizationResponseFormPostJWTOptions, type VerifyAuthorizationResponseOptions, type VerifyCredentialRequestJwtProofBaseOptions, VerifyCredentialRequestJwtProofError, type VerifyCredentialRequestJwtProofOptions, type VerifyCredentialRequestJwtProofOptionsV1_0, type VerifyCredentialRequestJwtProofOptionsV1_3, type VerifyCredentialRequestJwtProofOptionsV1_4, type VerifyCredentialRequestJwtProofResult, type VerifyCredentialRequestJwtProofResultV1_0, type VerifyCredentialRequestJwtProofResultV1_3, type VerifyCredentialRequestJwtProofResultV1_4, VerifyKeyAttestationJwtError, type VerifyKeyAttestationJwtOptions, type VerifyKeyAttestationJwtResult, type WalletAttestationOptions, WalletProvider, WalletProviderError, completeAuthorization, createCredentialRequest, createCredentialResponse, extractGrantDetails, fetchCredentialResponse, fetchMetadata, keyAttestationTypeHeader, parseCredentialOfferUri, parseCredentialRequest, resolveCredentialOffer, sendAuthorizationResponseAndExtractCode, validateCredentialOffer, verifyAuthorizationResponse, verifyAuthorizationResponseFormPostJWT, verifyCredentialRequestJwtProof, verifyKeyAttestationJwt, zAuthorizationCodeGrantV1_3, zAuthorizationCodeGrantV1_4, zAuthorizationResponse, zCredentialObject, zCredentialOfferGrantsV1_3, zCredentialOfferGrantsV1_4, zCredentialOfferV1_3, zCredentialOfferV1_4, zCredentialRequestV1_0, zCredentialRequestV1_3, zCredentialResponseEncryption, zCredentialResponseV1_0, zCredentialResponseV1_3, zDeferredCredentialResponseV1_0, zDeferredCredentialResponseV1_3, zImmediateCredentialResponse, zKeyAttestationAlg, zKeyAttestationHeader, zKeyAttestationPayload, zKeyAttestationStatus, zKeyAttestationTypeHeader, zMetadataResponse, zMetadataResponseV1_0, zMetadataResponseV1_3, zProofJwtHeaderV1_0, zProofJwtHeaderV1_3, zProofJwtPayload, zStatusList };
|
package/dist/index.d.ts
CHANGED
|
@@ -956,7 +956,8 @@ interface ParsedCredentialRequest {
|
|
|
956
956
|
* @param options - Parsing options and validation context.
|
|
957
957
|
* @returns Promise resolving to the normalized parsed credential request including the extracted `accessToken` and `dpopProof`.
|
|
958
958
|
* @throws {CredentialAuthorizationHeaderError} If the `Authorization` header is absent or invalid.
|
|
959
|
-
* @throws {
|
|
959
|
+
* @throws {MissingDpopProofError} If the `DPoP` header is absent.
|
|
960
|
+
* @throws {InvalidDpopProofError} If the `DPoP` header is present but not a valid compact JWT.
|
|
960
961
|
* @throws {ValidationError} If request body schema or semantic checks fail.
|
|
961
962
|
* @throws {Oauth2JwtParseError} If a proof JWT cannot be decoded.
|
|
962
963
|
* @throws {ParseCredentialRequestError} For unexpected parsing failures.
|
|
@@ -1539,6 +1540,12 @@ declare class CredentialOfferError extends Oid4vciError {
|
|
|
1539
1540
|
declare class MissingDpopProofError extends Oid4vciError {
|
|
1540
1541
|
constructor(message?: string, options?: ErrorOptions);
|
|
1541
1542
|
}
|
|
1543
|
+
/**
|
|
1544
|
+
* Error thrown when a credential request has an invalid DPoP proof header.
|
|
1545
|
+
*/
|
|
1546
|
+
declare class InvalidDpopProofError extends Oid4vciError {
|
|
1547
|
+
constructor(message?: string, options?: ErrorOptions);
|
|
1548
|
+
}
|
|
1542
1549
|
/**
|
|
1543
1550
|
* Error thrown when a credential request has a missing or invalid Authorization header.
|
|
1544
1551
|
*/
|
|
@@ -14215,4 +14222,4 @@ declare class WalletProvider {
|
|
|
14215
14222
|
createItWalletAttestationJwt(options: WalletAttestationOptions): Promise<string>;
|
|
14216
14223
|
}
|
|
14217
14224
|
|
|
14218
|
-
export { type AuthorizationCodeGrant, type AuthorizationCodeGrantV1_3, type AuthorizationCodeGrantV1_4, type AuthorizationResponse, type BaseCredentialRequestOptions, type CompleteAuthorizationOptions, type CompleteAuthorizationResult, CreateCredentialResponseError, type CreateCredentialResponseOptions, type CreateCredentialResponseOptionsV1_0, type CreateCredentialResponseOptionsV1_3, type CreateCredentialResponseOptionsV1_4, type CreateCredentialResponseResult, type CreateCredentialResponseResultWithFlow, CredentialAuthorizationHeaderError, type CredentialObject, type CredentialOffer, CredentialOfferError, type CredentialOfferGrants, type CredentialOfferGrantsV1_3, type CredentialOfferGrantsV1_4, type CredentialOfferUri, type CredentialOfferV1_3, type CredentialOfferV1_4, type CredentialRequest, type CredentialRequestOptions, type CredentialRequestOptionsV1_0, type CredentialRequestOptionsV1_3, type CredentialRequestOptionsV1_4, type CredentialRequestV1_0, type CredentialRequestV1_3, type CredentialResponse, type CredentialResponseEncryption, type CredentialResponseV1_0, type CredentialResponseV1_3, type DeferredCredentialResponseV1_0, type DeferredCredentialResponseV1_3, type DeferredFlowOptionsV1_0, type DeferredFlowOptionsV1_3, type ExtractGrantDetailsOptions, type ExtractGrantDetailsOptionsV1_3, type ExtractGrantDetailsOptionsV1_4, type ExtractGrantDetailsResult, type ExtractGrantDetailsResultV1_3, type ExtractGrantDetailsResultV1_4, FetchCredentialResponseError, type FetchCredentialResponseOptions, FetchMetadataError, type FetchMetadataOptions, type FetchStatusListCallback, type ImmediateCredentialResponse, type ImmediateFlowOptions, type KeyAttestationHeader, type KeyAttestationOptions, type KeyAttestationPayload, type KeyAttestationStatus, type MetadataResponse, type MetadataResponseV1_0, type MetadataResponseV1_3, MissingDpopProofError, NonceRequestError, Oid4vciError, type ParseCredentialOfferUriOptions, ParseCredentialRequestError, type ParseCredentialRequestExpectedValues, type ParseCredentialRequestOptions, type ParsedCredentialProof, type ParsedCredentialRequest, type ProofJwtHeader, type ProofJwtHeaderV1_0, type ProofJwtHeaderV1_3, type ProofJwtPayload, type ResolveCredentialOfferOptions, type ResolveCredentialOfferOptionsV1_3, type ResolveCredentialOfferOptionsV1_4, type SendAuthorizationResponseAndExtractCodeOptions, type StatusList, type ValidateCredentialOfferOptions, type ValidateCredentialOfferOptionsV1_3, type ValidateCredentialOfferOptionsV1_4, type VerifyAuthorizationResponseFormPostJWTOptions, type VerifyAuthorizationResponseOptions, type VerifyCredentialRequestJwtProofBaseOptions, VerifyCredentialRequestJwtProofError, type VerifyCredentialRequestJwtProofOptions, type VerifyCredentialRequestJwtProofOptionsV1_0, type VerifyCredentialRequestJwtProofOptionsV1_3, type VerifyCredentialRequestJwtProofOptionsV1_4, type VerifyCredentialRequestJwtProofResult, type VerifyCredentialRequestJwtProofResultV1_0, type VerifyCredentialRequestJwtProofResultV1_3, type VerifyCredentialRequestJwtProofResultV1_4, VerifyKeyAttestationJwtError, type VerifyKeyAttestationJwtOptions, type VerifyKeyAttestationJwtResult, type WalletAttestationOptions, WalletProvider, WalletProviderError, completeAuthorization, createCredentialRequest, createCredentialResponse, extractGrantDetails, fetchCredentialResponse, fetchMetadata, keyAttestationTypeHeader, parseCredentialOfferUri, parseCredentialRequest, resolveCredentialOffer, sendAuthorizationResponseAndExtractCode, validateCredentialOffer, verifyAuthorizationResponse, verifyAuthorizationResponseFormPostJWT, verifyCredentialRequestJwtProof, verifyKeyAttestationJwt, zAuthorizationCodeGrantV1_3, zAuthorizationCodeGrantV1_4, zAuthorizationResponse, zCredentialObject, zCredentialOfferGrantsV1_3, zCredentialOfferGrantsV1_4, zCredentialOfferV1_3, zCredentialOfferV1_4, zCredentialRequestV1_0, zCredentialRequestV1_3, zCredentialResponseEncryption, zCredentialResponseV1_0, zCredentialResponseV1_3, zDeferredCredentialResponseV1_0, zDeferredCredentialResponseV1_3, zImmediateCredentialResponse, zKeyAttestationAlg, zKeyAttestationHeader, zKeyAttestationPayload, zKeyAttestationStatus, zKeyAttestationTypeHeader, zMetadataResponse, zMetadataResponseV1_0, zMetadataResponseV1_3, zProofJwtHeaderV1_0, zProofJwtHeaderV1_3, zProofJwtPayload, zStatusList };
|
|
14225
|
+
export { type AuthorizationCodeGrant, type AuthorizationCodeGrantV1_3, type AuthorizationCodeGrantV1_4, type AuthorizationResponse, type BaseCredentialRequestOptions, type CompleteAuthorizationOptions, type CompleteAuthorizationResult, CreateCredentialResponseError, type CreateCredentialResponseOptions, type CreateCredentialResponseOptionsV1_0, type CreateCredentialResponseOptionsV1_3, type CreateCredentialResponseOptionsV1_4, type CreateCredentialResponseResult, type CreateCredentialResponseResultWithFlow, CredentialAuthorizationHeaderError, type CredentialObject, type CredentialOffer, CredentialOfferError, type CredentialOfferGrants, type CredentialOfferGrantsV1_3, type CredentialOfferGrantsV1_4, type CredentialOfferUri, type CredentialOfferV1_3, type CredentialOfferV1_4, type CredentialRequest, type CredentialRequestOptions, type CredentialRequestOptionsV1_0, type CredentialRequestOptionsV1_3, type CredentialRequestOptionsV1_4, type CredentialRequestV1_0, type CredentialRequestV1_3, type CredentialResponse, type CredentialResponseEncryption, type CredentialResponseV1_0, type CredentialResponseV1_3, type DeferredCredentialResponseV1_0, type DeferredCredentialResponseV1_3, type DeferredFlowOptionsV1_0, type DeferredFlowOptionsV1_3, type ExtractGrantDetailsOptions, type ExtractGrantDetailsOptionsV1_3, type ExtractGrantDetailsOptionsV1_4, type ExtractGrantDetailsResult, type ExtractGrantDetailsResultV1_3, type ExtractGrantDetailsResultV1_4, FetchCredentialResponseError, type FetchCredentialResponseOptions, FetchMetadataError, type FetchMetadataOptions, type FetchStatusListCallback, type ImmediateCredentialResponse, type ImmediateFlowOptions, InvalidDpopProofError, type KeyAttestationHeader, type KeyAttestationOptions, type KeyAttestationPayload, type KeyAttestationStatus, type MetadataResponse, type MetadataResponseV1_0, type MetadataResponseV1_3, MissingDpopProofError, NonceRequestError, Oid4vciError, type ParseCredentialOfferUriOptions, ParseCredentialRequestError, type ParseCredentialRequestExpectedValues, type ParseCredentialRequestOptions, type ParsedCredentialProof, type ParsedCredentialRequest, type ProofJwtHeader, type ProofJwtHeaderV1_0, type ProofJwtHeaderV1_3, type ProofJwtPayload, type ResolveCredentialOfferOptions, type ResolveCredentialOfferOptionsV1_3, type ResolveCredentialOfferOptionsV1_4, type SendAuthorizationResponseAndExtractCodeOptions, type StatusList, type ValidateCredentialOfferOptions, type ValidateCredentialOfferOptionsV1_3, type ValidateCredentialOfferOptionsV1_4, type VerifyAuthorizationResponseFormPostJWTOptions, type VerifyAuthorizationResponseOptions, type VerifyCredentialRequestJwtProofBaseOptions, VerifyCredentialRequestJwtProofError, type VerifyCredentialRequestJwtProofOptions, type VerifyCredentialRequestJwtProofOptionsV1_0, type VerifyCredentialRequestJwtProofOptionsV1_3, type VerifyCredentialRequestJwtProofOptionsV1_4, type VerifyCredentialRequestJwtProofResult, type VerifyCredentialRequestJwtProofResultV1_0, type VerifyCredentialRequestJwtProofResultV1_3, type VerifyCredentialRequestJwtProofResultV1_4, VerifyKeyAttestationJwtError, type VerifyKeyAttestationJwtOptions, type VerifyKeyAttestationJwtResult, type WalletAttestationOptions, WalletProvider, WalletProviderError, completeAuthorization, createCredentialRequest, createCredentialResponse, extractGrantDetails, fetchCredentialResponse, fetchMetadata, keyAttestationTypeHeader, parseCredentialOfferUri, parseCredentialRequest, resolveCredentialOffer, sendAuthorizationResponseAndExtractCode, validateCredentialOffer, verifyAuthorizationResponse, verifyAuthorizationResponseFormPostJWT, verifyCredentialRequestJwtProof, verifyKeyAttestationJwt, zAuthorizationCodeGrantV1_3, zAuthorizationCodeGrantV1_4, zAuthorizationResponse, zCredentialObject, zCredentialOfferGrantsV1_3, zCredentialOfferGrantsV1_4, zCredentialOfferV1_3, zCredentialOfferV1_4, zCredentialRequestV1_0, zCredentialRequestV1_3, zCredentialResponseEncryption, zCredentialResponseV1_0, zCredentialResponseV1_3, zDeferredCredentialResponseV1_0, zDeferredCredentialResponseV1_3, zImmediateCredentialResponse, zKeyAttestationAlg, zKeyAttestationHeader, zKeyAttestationPayload, zKeyAttestationStatus, zKeyAttestationTypeHeader, zMetadataResponse, zMetadataResponseV1_0, zMetadataResponseV1_3, zProofJwtHeaderV1_0, zProofJwtHeaderV1_3, zProofJwtPayload, zStatusList };
|
package/dist/index.js
CHANGED
|
@@ -35,6 +35,7 @@ __export(index_exports, {
|
|
|
35
35
|
CredentialOfferError: () => CredentialOfferError,
|
|
36
36
|
FetchCredentialResponseError: () => FetchCredentialResponseError,
|
|
37
37
|
FetchMetadataError: () => FetchMetadataError,
|
|
38
|
+
InvalidDpopProofError: () => InvalidDpopProofError,
|
|
38
39
|
MissingDpopProofError: () => MissingDpopProofError,
|
|
39
40
|
NonceRequestError: () => NonceRequestError,
|
|
40
41
|
Oid4vciError: () => Oid4vciError,
|
|
@@ -168,6 +169,12 @@ var MissingDpopProofError = class extends Oid4vciError {
|
|
|
168
169
|
this.name = "MissingDpopProofError";
|
|
169
170
|
}
|
|
170
171
|
};
|
|
172
|
+
var InvalidDpopProofError = class extends Oid4vciError {
|
|
173
|
+
constructor(message = "Credential request has an invalid 'DPoP' proof header", options) {
|
|
174
|
+
super(message, options);
|
|
175
|
+
this.name = "InvalidDpopProofError";
|
|
176
|
+
}
|
|
177
|
+
};
|
|
171
178
|
var CredentialAuthorizationHeaderError = class extends Oid4vciError {
|
|
172
179
|
constructor(message = "Credential request is missing required 'Authorization' header with DPoP scheme", options) {
|
|
173
180
|
super(message, options);
|
|
@@ -995,14 +1002,12 @@ function parseAuthorizationHeader(headers) {
|
|
|
995
1002
|
function parseDpopProof(headers) {
|
|
996
1003
|
const extracted = (0, import_io_wallet_oauth23.extractDpopJwtFromHeaders)(headers);
|
|
997
1004
|
if (!extracted.valid) {
|
|
998
|
-
throw new
|
|
1005
|
+
throw new InvalidDpopProofError(
|
|
999
1006
|
"Credential request contains a 'DPoP' header, but the value is not a valid JWT format"
|
|
1000
1007
|
);
|
|
1001
1008
|
}
|
|
1002
1009
|
if (!extracted.dpopJwt) {
|
|
1003
|
-
throw new MissingDpopProofError(
|
|
1004
|
-
"Credential request contains a 'DPoP' header, but the value is missing or empty"
|
|
1005
|
-
);
|
|
1010
|
+
throw new MissingDpopProofError();
|
|
1006
1011
|
}
|
|
1007
1012
|
return extracted.dpopJwt;
|
|
1008
1013
|
}
|
|
@@ -1077,7 +1082,7 @@ async function parseCredentialRequest(options) {
|
|
|
1077
1082
|
isDeferredFlow
|
|
1078
1083
|
});
|
|
1079
1084
|
} catch (error) {
|
|
1080
|
-
if (error instanceof import_io_wallet_utils8.ItWalletSpecsVersionError || error instanceof import_io_wallet_oauth23.Oauth2JwtParseError || error instanceof import_io_wallet_utils8.ValidationError || error instanceof CredentialAuthorizationHeaderError || error instanceof MissingDpopProofError) {
|
|
1085
|
+
if (error instanceof import_io_wallet_utils8.ItWalletSpecsVersionError || error instanceof import_io_wallet_oauth23.Oauth2JwtParseError || error instanceof import_io_wallet_utils8.ValidationError || error instanceof CredentialAuthorizationHeaderError || error instanceof MissingDpopProofError || error instanceof InvalidDpopProofError) {
|
|
1081
1086
|
throw error;
|
|
1082
1087
|
}
|
|
1083
1088
|
throw new ParseCredentialRequestError(
|
|
@@ -1952,6 +1957,7 @@ var WalletProvider = class {
|
|
|
1952
1957
|
CredentialOfferError,
|
|
1953
1958
|
FetchCredentialResponseError,
|
|
1954
1959
|
FetchMetadataError,
|
|
1960
|
+
InvalidDpopProofError,
|
|
1955
1961
|
MissingDpopProofError,
|
|
1956
1962
|
NonceRequestError,
|
|
1957
1963
|
Oid4vciError,
|