@pagopa/io-react-native-wallet 0.20.0 → 0.22.0
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/commonjs/credential/issuance/06-obtain-credential.js +5 -4
- package/lib/commonjs/credential/issuance/06-obtain-credential.js.map +1 -1
- package/lib/commonjs/credential/issuance/README.md +7 -5
- package/lib/commonjs/credential/issuance/types.js +5 -1
- package/lib/commonjs/credential/issuance/types.js.map +1 -1
- package/lib/commonjs/credential/status/02-status-attestation.js +4 -3
- package/lib/commonjs/credential/status/02-status-attestation.js.map +1 -1
- package/lib/commonjs/credential/status/README.md +1 -1
- package/lib/commonjs/credential/status/types.js +14 -1
- package/lib/commonjs/credential/status/types.js.map +1 -1
- package/lib/commonjs/sd-jwt/index.js +3 -1
- package/lib/commonjs/sd-jwt/index.js.map +1 -1
- package/lib/commonjs/trust/types.js +11 -2
- package/lib/commonjs/trust/types.js.map +1 -1
- package/lib/commonjs/utils/errors.js +57 -29
- package/lib/commonjs/utils/errors.js.map +1 -1
- package/lib/commonjs/utils/misc.js +11 -2
- package/lib/commonjs/utils/misc.js.map +1 -1
- package/lib/module/credential/issuance/06-obtain-credential.js +8 -7
- package/lib/module/credential/issuance/06-obtain-credential.js.map +1 -1
- package/lib/module/credential/issuance/README.md +7 -5
- package/lib/module/credential/issuance/types.js +3 -0
- package/lib/module/credential/issuance/types.js.map +1 -1
- package/lib/module/credential/status/02-status-attestation.js +7 -6
- package/lib/module/credential/status/02-status-attestation.js.map +1 -1
- package/lib/module/credential/status/README.md +1 -1
- package/lib/module/credential/status/types.js +12 -0
- package/lib/module/credential/status/types.js.map +1 -1
- package/lib/module/sd-jwt/index.js +3 -2
- package/lib/module/sd-jwt/index.js.map +1 -1
- package/lib/module/trust/types.js +11 -2
- package/lib/module/trust/types.js.map +1 -1
- package/lib/module/utils/errors.js +52 -25
- package/lib/module/utils/errors.js.map +1 -1
- package/lib/module/utils/misc.js +9 -1
- package/lib/module/utils/misc.js.map +1 -1
- package/lib/typescript/credential/issuance/06-obtain-credential.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/types.d.ts +8 -0
- package/lib/typescript/credential/issuance/types.d.ts.map +1 -1
- package/lib/typescript/credential/status/02-status-attestation.d.ts +1 -1
- package/lib/typescript/credential/status/02-status-attestation.d.ts.map +1 -1
- package/lib/typescript/credential/status/types.d.ts +15 -0
- package/lib/typescript/credential/status/types.d.ts.map +1 -1
- package/lib/typescript/sd-jwt/index.d.ts.map +1 -1
- package/lib/typescript/trust/index.d.ts +16 -0
- package/lib/typescript/trust/index.d.ts.map +1 -1
- package/lib/typescript/trust/types.d.ts +216 -0
- package/lib/typescript/trust/types.d.ts.map +1 -1
- package/lib/typescript/utils/errors.d.ts +31 -14
- package/lib/typescript/utils/errors.d.ts.map +1 -1
- package/lib/typescript/utils/misc.d.ts +1 -0
- package/lib/typescript/utils/misc.d.ts.map +1 -1
- package/package.json +4 -3
- package/src/credential/issuance/06-obtain-credential.ts +11 -7
- package/src/credential/issuance/README.md +7 -5
- package/src/credential/issuance/types.ts +8 -0
- package/src/credential/status/02-status-attestation.ts +13 -5
- package/src/credential/status/README.md +1 -1
- package/src/credential/status/types.ts +15 -0
- package/src/sd-jwt/index.ts +3 -3
- package/src/trust/types.ts +14 -1
- package/src/utils/errors.ts +72 -26
- package/src/utils/misc.ts +12 -4
@@ -1,7 +1,7 @@
|
|
1
1
|
import { sha256ToBase64, SignJWT } from "@pagopa/io-react-native-jwt";
|
2
|
-
import { hasStatus } from "../../utils/misc";
|
3
|
-
import {
|
4
|
-
import { CredentialResponse } from "./types";
|
2
|
+
import { hasStatus, safeJsonParse } from "../../utils/misc";
|
3
|
+
import { CredentialInvalidStatusError, CredentialIssuingNotSynchronousError, CredentialRequestError, UnexpectedStatusCodeError, ValidationFailed } from "../../utils/errors";
|
4
|
+
import { CredentialIssuanceFailureResponse, CredentialResponse } from "./types";
|
5
5
|
import { createDPopToken } from "../../utils/dpop";
|
6
6
|
import uuid from "react-native-uuid";
|
7
7
|
export const createNonceProof = async (nonce, issuer, audience, ctx) => {
|
@@ -87,8 +87,8 @@ export const obtainCredential = async (issuerConf, accessToken, clientId, creden
|
|
87
87
|
* Handle the credential error by mapping it to a custom exception.
|
88
88
|
* If the error is not an instance of {@link UnexpectedStatusCodeError}, it is thrown as is.
|
89
89
|
* @param e - The error to be handled
|
90
|
-
* @throws {@link
|
91
|
-
* @throws {@link
|
90
|
+
* @throws {@link CredentialRequestError} if the status code is different from 404
|
91
|
+
* @throws {@link CredentialInvalidStatusError} if the status code is 404 (meaning the credential is invalid)
|
92
92
|
*/
|
93
93
|
const handleObtainCredentialError = e => {
|
94
94
|
if (!(e instanceof UnexpectedStatusCodeError)) {
|
@@ -100,8 +100,9 @@ const handleObtainCredentialError = e => {
|
|
100
100
|
if (e.statusCode === 201) {
|
101
101
|
throw new CredentialIssuingNotSynchronousError("This credential cannot be issued synchronously. It will be available at a later time.", e.message);
|
102
102
|
}
|
103
|
-
if (e.statusCode
|
104
|
-
|
103
|
+
if ([403, 404].includes(e.statusCode)) {
|
104
|
+
const maybeError = CredentialIssuanceFailureResponse.safeParse(safeJsonParse(e.responseBody));
|
105
|
+
throw new CredentialInvalidStatusError("Invalid status found for the given credential", maybeError.success ? maybeError.data.error : "unknown", e.message);
|
105
106
|
}
|
106
107
|
throw new CredentialRequestError(`Unable to obtain the requested credential [response status code: ${e.statusCode}]`, e.message);
|
107
108
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["sha256ToBase64","SignJWT","hasStatus","
|
1
|
+
{"version":3,"names":["sha256ToBase64","SignJWT","hasStatus","safeJsonParse","CredentialInvalidStatusError","CredentialIssuingNotSynchronousError","CredentialRequestError","UnexpectedStatusCodeError","ValidationFailed","CredentialIssuanceFailureResponse","CredentialResponse","createDPopToken","uuid","createNonceProof","nonce","issuer","audience","ctx","jwk","getPublicKey","setPayload","setProtectedHeader","typ","setAudience","setIssuer","setIssuedAt","setExpirationTime","sign","obtainCredential","issuerConf","accessToken","clientId","credentialDefinition","context","credentialCryptoContext","appFetch","fetch","dPopCryptoContext","credentialUrl","openid_credential_issuer","credential_endpoint","signedNonceProof","c_nonce","constainsCredentialDefinition","authorization_details","some","c","credential_configuration_id","format","type","credentialRequestFormBody","credential_definition","proof","jwt","proof_type","tokenRequestSignedDPop","htm","htu","jti","v4","ath","access_token","credentialRes","method","headers","DPoP","Authorization","token_type","body","JSON","stringify","then","res","json","safeParse","catch","handleObtainCredentialError","success","error","message","data","e","statusCode","includes","maybeError","responseBody"],"sourceRoot":"../../../../src","sources":["credential/issuance/06-obtain-credential.ts"],"mappings":"AAAA,SACEA,cAAc,EACdC,OAAO,QAEF,6BAA6B;AAGpC,SAASC,SAAS,EAAEC,aAAa,QAAkB,kBAAkB;AAErE,SACEC,4BAA4B,EAC5BC,oCAAoC,EACpCC,sBAAsB,EACtBC,yBAAyB,EACzBC,gBAAgB,QACX,oBAAoB;AAC3B,SAASC,iCAAiC,EAAEC,kBAAkB,QAAQ,SAAS;AAE/E,SAASC,eAAe,QAAQ,kBAAkB;AAClD,OAAOC,IAAI,MAAM,mBAAmB;AAcpC,OAAO,MAAMC,gBAAgB,GAAG,MAAAA,CAC9BC,KAAa,EACbC,MAAc,EACdC,QAAgB,EAChBC,GAAkB,KACE;EACpB,MAAMC,GAAG,GAAG,MAAMD,GAAG,CAACE,YAAY,CAAC,CAAC;EACpC,OAAO,IAAIlB,OAAO,CAACgB,GAAG,CAAC,CACpBG,UAAU,CAAC;IACVN;EACF,CAAC,CAAC,CACDO,kBAAkB,CAAC;IAClBC,GAAG,EAAE,sBAAsB;IAC3BJ;EACF,CAAC,CAAC,CACDK,WAAW,CAACP,QAAQ,CAAC,CACrBQ,SAAS,CAACT,MAAM,CAAC,CACjBU,WAAW,CAAC,CAAC,CACbC,iBAAiB,CAAC,MAAM,CAAC,CACzBC,IAAI,CAAC,CAAC;AACX,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MA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AAIjF,4BAA4B,CACpC,+CAA+C,EAC/CgF,UAAU,CAACP,OAAO,GAAGO,UAAU,CAACJ,IAAI,CAACF,KAAK,GAAG,SAAS,EACtDG,CAAC,CAACF,OACJ,CAAC;EACH;EAEA,MAAM,IAAIzE,sBAAsB,CAC7B,oEAAmE2E,CAAC,CAACC,UAAW,GAAE,EACnFD,CAAC,CAACF,OACJ,CAAC;AACH,CAAC"}
|
@@ -43,14 +43,16 @@ graph TD;
|
|
43
43
|
|
44
44
|
A `201 Created` response is returned by the credential issuer when the request has been queued because the credential cannot be issued synchronously. The consumer should try to obtain the credential at a later time.
|
45
45
|
|
46
|
-
|
46
|
+
Although `201 Created` is not considered an error, it is mapped as an error in this context in order to handle the case where the credential issuance is not synchronous.
|
47
|
+
This allows keeping the flow consistent and handle the case where the credential is not immediately available.
|
47
48
|
|
48
|
-
|
49
|
+
### 403 Forbidden (CredentialInvalidStatusError)
|
49
50
|
|
50
|
-
|
51
|
+
A `403 Forbidden` response is returned by the credential issuer when the requested credential has an invalid status. It might contain more details in the `errorCode` property.
|
51
52
|
|
52
|
-
|
53
|
-
|
53
|
+
### 404 Not Found (CredentialInvalidStatusError)
|
54
|
+
|
55
|
+
A `404 Not Found` response is returned by the credential issuer when the authenticated user is not entitled to receive the requested credential. It might contain more details in the `errorCode` property.
|
54
56
|
|
55
57
|
## Strong authentication for eID issuance (Query Mode)
|
56
58
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["AuthorizationDetail","z","SupportedCredentialFormat","TokenResponse","object","access_token","string","authorization_details","array","c_nonce","c_nonce_expires_in","number","expires_in","token_type","CredentialResponse","credential","format","ResponseUriResultShape","redirect_uri"],"sourceRoot":"../../../../src","sources":["credential/issuance/types.ts"],"mappings":"AAAA,SAASA,mBAAmB,QAAQ,iBAAiB;AACrD,OAAO,KAAKC,CAAC,MAAM,KAAK;AACxB,SAASC,yBAAyB,QAAQ,SAAS;AAInD,OAAO,MAAMC,aAAa,GAAGF,CAAC,CAACG,MAAM,CAAC;EACpCC,YAAY,EAAEJ,CAAC,CAACK,MAAM,CAAC,CAAC;EACxBC,qBAAqB,EAAEN,CAAC,CAACO,KAAK,CAACR,mBAAmB,CAAC;EACnDS,OAAO,EAAER,CAAC,CAACK,MAAM,CAAC,CAAC;EACnBI,kBAAkB,EAAET,CAAC,CAACU,MAAM,CAAC,CAAC;EAC9BC,UAAU,EAAEX,CAAC,CAACU,MAAM,CAAC,CAAC;EACtBE,UAAU,EAAEZ,CAAC,CAACK,MAAM,CAAC;AACvB,CAAC,CAAC;AAIF,OAAO,MAAMQ,kBAAkB,GAAGb,CAAC,CAACG,MAAM,CAAC;EACzCK,OAAO,EAAER,CAAC,CAACK,MAAM,CAAC,CAAC;EACnBI,kBAAkB,EAAET,CAAC,CAACU,MAAM,CAAC,CAAC;EAC9BI,UAAU,EAAEd,CAAC,CAACK,MAAM,CAAC,CAAC;EACtBU,MAAM,EAAEd;AACV,CAAC,CAAC;;AAEF;AACA;AACA;AACA,OAAO,MAAMe,sBAAsB,GAAGhB,CAAC,CAACG,MAAM,CAAC;EAC7Cc,YAAY,EAAEjB,CAAC,CAACK,MAAM,CAAC;AACzB,CAAC,CAAC"}
|
1
|
+
{"version":3,"names":["AuthorizationDetail","z","SupportedCredentialFormat","TokenResponse","object","access_token","string","authorization_details","array","c_nonce","c_nonce_expires_in","number","expires_in","token_type","CredentialResponse","credential","format","ResponseUriResultShape","redirect_uri","CredentialIssuanceFailureResponse","error"],"sourceRoot":"../../../../src","sources":["credential/issuance/types.ts"],"mappings":"AAAA,SAASA,mBAAmB,QAAQ,iBAAiB;AACrD,OAAO,KAAKC,CAAC,MAAM,KAAK;AACxB,SAASC,yBAAyB,QAAQ,SAAS;AAInD,OAAO,MAAMC,aAAa,GAAGF,CAAC,CAACG,MAAM,CAAC;EACpCC,YAAY,EAAEJ,CAAC,CAACK,MAAM,CAAC,CAAC;EACxBC,qBAAqB,EAAEN,CAAC,CAACO,KAAK,CAACR,mBAAmB,CAAC;EACnDS,OAAO,EAAER,CAAC,CAACK,MAAM,CAAC,CAAC;EACnBI,kBAAkB,EAAET,CAAC,CAACU,MAAM,CAAC,CAAC;EAC9BC,UAAU,EAAEX,CAAC,CAACU,MAAM,CAAC,CAAC;EACtBE,UAAU,EAAEZ,CAAC,CAACK,MAAM,CAAC;AACvB,CAAC,CAAC;AAIF,OAAO,MAAMQ,kBAAkB,GAAGb,CAAC,CAACG,MAAM,CAAC;EACzCK,OAAO,EAAER,CAAC,CAACK,MAAM,CAAC,CAAC;EACnBI,kBAAkB,EAAET,CAAC,CAACU,MAAM,CAAC,CAAC;EAC9BI,UAAU,EAAEd,CAAC,CAACK,MAAM,CAAC,CAAC;EACtBU,MAAM,EAAEd;AACV,CAAC,CAAC;;AAEF;AACA;AACA;AACA,OAAO,MAAMe,sBAAsB,GAAGhB,CAAC,CAACG,MAAM,CAAC;EAC7Cc,YAAY,EAAEjB,CAAC,CAACK,MAAM,CAAC;AACzB,CAAC,CAAC;AAIF,OAAO,MAAMa,iCAAiC,GAAGlB,CAAC,CAACG,MAAM,CAAC;EACxDgB,KAAK,EAAEnB,CAAC,CAACK,MAAM,CAAC;AAClB,CAAC,CAAC"}
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import { getCredentialHashWithouDiscloures, hasStatus } from "../../utils/misc";
|
1
|
+
import { getCredentialHashWithouDiscloures, hasStatus, safeJsonParse } from "../../utils/misc";
|
2
2
|
import { SignJWT } from "@pagopa/io-react-native-jwt";
|
3
3
|
import uuid from "react-native-uuid";
|
4
|
-
import { StatusAttestationResponse } from "./types";
|
5
|
-
import { StatusAttestationError,
|
4
|
+
import { InvalidStatusAttestationResponse, StatusAttestationResponse } from "./types";
|
5
|
+
import { StatusAttestationError, CredentialInvalidStatusError, UnexpectedStatusCodeError } from "../../utils/errors";
|
6
6
|
/**
|
7
7
|
* WARNING: This function must be called after {@link startFlow}.
|
8
8
|
* Verify the status of the credential attestation.
|
@@ -10,7 +10,7 @@ import { StatusAttestationError, StatusAttestationInvalid, UnexpectedStatusCodeE
|
|
10
10
|
* @param credential - The credential to be verified
|
11
11
|
* @param credentialCryptoContext - The credential's crypto context
|
12
12
|
* @param context.appFetch (optional) fetch api implementation. Default: built-in fetch
|
13
|
-
* @throws {@link
|
13
|
+
* @throws {@link CredentialInvalidStatusError} if the status attestation is invalid and thus the credential is not valid
|
14
14
|
* @throws {@link StatusAttestationError} if an error occurs during the status attestation
|
15
15
|
* @returns The credential status attestation
|
16
16
|
*/
|
@@ -49,14 +49,15 @@ export const statusAttestation = async function (issuerConf, credential, credent
|
|
49
49
|
* If the error is not an instance of {@link UnexpectedStatusCodeError}, it is thrown as is.
|
50
50
|
* @param e - The error to be handled
|
51
51
|
* @throws {@link StatusAttestationError} if the status code is different from 404
|
52
|
-
* @throws {@link
|
52
|
+
* @throws {@link CredentialInvalidStatusError} if the status code is 404 (meaning the credential is invalid)
|
53
53
|
*/
|
54
54
|
const handleStatusAttestationError = e => {
|
55
55
|
if (!(e instanceof UnexpectedStatusCodeError)) {
|
56
56
|
throw e;
|
57
57
|
}
|
58
58
|
if (e.statusCode === 404) {
|
59
|
-
|
59
|
+
const maybeError = InvalidStatusAttestationResponse.safeParse(safeJsonParse(e.responseBody));
|
60
|
+
throw new CredentialInvalidStatusError("Invalid status found for the given credential", maybeError.success ? maybeError.data.error : "unknown", e.message);
|
60
61
|
}
|
61
62
|
throw new StatusAttestationError(`Unable to obtain the status attestation for the given credential [response status code: ${e.statusCode}]`, e.message);
|
62
63
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["getCredentialHashWithouDiscloures","hasStatus","SignJWT","uuid","StatusAttestationResponse","StatusAttestationError","
|
1
|
+
{"version":3,"names":["getCredentialHashWithouDiscloures","hasStatus","safeJsonParse","SignJWT","uuid","InvalidStatusAttestationResponse","StatusAttestationResponse","StatusAttestationError","CredentialInvalidStatusError","UnexpectedStatusCodeError","statusAttestation","issuerConf","credential","credentialCryptoContext","appFetch","arguments","length","undefined","fetch","jwk","getPublicKey","credentialHash","statusAttUrl","openid_credential_issuer","status_attestation_endpoint","credentialPop","setPayload","aud","jti","v4","toString","credential_hash","credential_hash_alg","setProtectedHeader","alg","typ","kid","setIssuedAt","setExpirationTime","sign","body","credential_pop","result","method","headers","JSON","stringify","then","raw","json","parse","catch","handleStatusAttestationError","status_attestation","e","statusCode","maybeError","safeParse","responseBody","success","data","error","message"],"sourceRoot":"../../../../src","sources":["credential/status/02-status-attestation.ts"],"mappings":"AAAA,SACEA,iCAAiC,EACjCC,SAAS,EACTC,aAAa,QAER,kBAAkB;AAEzB,SAASC,OAAO,QAA4B,6BAA6B;AACzE,OAAOC,IAAI,MAAM,mBAAmB;AACpC,SACEC,gCAAgC,EAChCC,yBAAyB,QACpB,SAAS;AAChB,SACEC,sBAAsB,EACtBC,4BAA4B,EAC5BC,yBAAyB,QACpB,oBAAoB;AAW3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,iBAAoC,GAAG,eAAAA,CAClDC,UAAU,EACVC,UAAU,EACVC,uBAAuB,EAEpB;EAAA,IADHC,QAA8B,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAGG,KAAK;EAEtC,MAAMC,GAAG,GAAG,MAAMN,uBAAuB,CAACO,YAAY,CAAC,CAAC;EACxD,MAAMC,cAAc,GAAG,MAAMrB,iCAAiC,CAACY,UAAU,CAAC;EAC1E,MAAMU,YAAY,GAChBX,UAAU,CAACY,wBAAwB,CAACC,2BAA2B;EACjE,MAAMC,aAAa,GAAG,MAAM,IAAItB,OAAO,CAACU,uBAAuB,CAAC,CAC7Da,UAAU,CAAC;IACVC,GAAG,EAAEL,YAAY;IACjBM,GAAG,EAAExB,IAAI,CAACyB,EAAE,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;IACzBC,eAAe,EAAEV,cAAc;IAC/BW,mBAAmB,EAAE;EACvB,CAAC,CAAC,C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CAAC;EACH;EAEA,MAAM,IAAIvD,sBAAsB,CAC7B,2FAA0F+C,CAAC,CAACC,UAAW,GAAE,EAC1GD,CAAC,CAACQ,OACJ,CAAC;AACH,CAAC"}
|
@@ -37,4 +37,16 @@ export const ParsedStatusAttestation = z.object({
|
|
37
37
|
iat: UnixTime
|
38
38
|
})
|
39
39
|
});
|
40
|
+
|
41
|
+
/**
|
42
|
+
* Shape from parsing a status attestation response in case of error.
|
43
|
+
*/
|
44
|
+
export const InvalidStatusAttestationResponse = z.object({
|
45
|
+
error: z.string()
|
46
|
+
});
|
47
|
+
|
48
|
+
/**
|
49
|
+
* Type from parsing a status attestation response in case of error.
|
50
|
+
* Inferred from {@link InvalidStatusAttestationResponse}.
|
51
|
+
*/
|
40
52
|
//# sourceMappingURL=types.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["UnixTime","JWK","z","StatusAttestationResponse","object","status_attestation","string","ParsedStatusAttestation","header","typ","literal","alg","kid","optional","payload","credential_hash_alg","credential_hash","cnf","jwk","exp","iat"],"sourceRoot":"../../../../src","sources":["credential/status/types.ts"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,GAAG,QAAQ,iBAAiB;AACrC,OAAO,KAAKC,CAAC,MAAM,KAAK;;AAExB;AACA;AACA;AACA,OAAO,MAAMC,yBAAyB,GAAGD,CAAC,CAACE,MAAM,CAAC;EAChDC,kBAAkB,EAAEH,CAAC,CAACI,MAAM,CAAC;AAC/B,CAAC,CAAC;;AAEF;AACA;AACA;AACA;;AAKA;AACA;AACA;;AAGA;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,GAAGL,CAAC,CAACE,MAAM,CAAC;EAC9CI,MAAM,EAAEN,CAAC,CAACE,MAAM,CAAC;IACfK,GAAG,EAAEP,CAAC,CAACQ,OAAO,CAAC,wBAAwB,CAAC;IACxCC,GAAG,EAAET,CAAC,CAACI,MAAM,CAAC,CAAC;IACfM,GAAG,EAAEV,CAAC,CAACI,MAAM,CAAC,CAAC,CAACO,QAAQ,CAAC;EAC3B,CAAC,CAAC;EACFC,OAAO,EAAEZ,CAAC,CAACE,MAAM,CAAC;IAChBW,mBAAmB,EAAEb,CAAC,CAACI,MAAM,CAAC,CAAC;IAC/BU,eAAe,EAAEd,CAAC,CAACI,MAAM,CAAC,CAAC;IAC3BW,GAAG,EAAEf,CAAC,CAACE,MAAM,CAAC;MACZc,GAAG,EAAEjB;IACP,CAAC,CAAC;IACFkB,GAAG,EAAEnB,QAAQ;IACboB,GAAG,EAAEpB;EACP,CAAC;AACH,CAAC,CAAC"}
|
1
|
+
{"version":3,"names":["UnixTime","JWK","z","StatusAttestationResponse","object","status_attestation","string","ParsedStatusAttestation","header","typ","literal","alg","kid","optional","payload","credential_hash_alg","credential_hash","cnf","jwk","exp","iat","InvalidStatusAttestationResponse","error"],"sourceRoot":"../../../../src","sources":["credential/status/types.ts"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,GAAG,QAAQ,iBAAiB;AACrC,OAAO,KAAKC,CAAC,MAAM,KAAK;;AAExB;AACA;AACA;AACA,OAAO,MAAMC,yBAAyB,GAAGD,CAAC,CAACE,MAAM,CAAC;EAChDC,kBAAkB,EAAEH,CAAC,CAACI,MAAM,CAAC;AAC/B,CAAC,CAAC;;AAEF;AACA;AACA;AACA;;AAKA;AACA;AACA;;AAGA;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,GAAGL,CAAC,CAACE,MAAM,CAAC;EAC9CI,MAAM,EAAEN,CAAC,CAACE,MAAM,CAAC;IACfK,GAAG,EAAEP,CAAC,CAACQ,OAAO,CAAC,wBAAwB,CAAC;IACxCC,GAAG,EAAET,CAAC,CAACI,MAAM,CAAC,CAAC;IACfM,GAAG,EAAEV,CAAC,CAACI,MAAM,CAAC,CAAC,CAACO,QAAQ,CAAC;EAC3B,CAAC,CAAC;EACFC,OAAO,EAAEZ,CAAC,CAACE,MAAM,CAAC;IAChBW,mBAAmB,EAAEb,CAAC,CAACI,MAAM,CAAC,CAAC;IAC/BU,eAAe,EAAEd,CAAC,CAACI,MAAM,CAAC,CAAC;IAC3BW,GAAG,EAAEf,CAAC,CAACE,MAAM,CAAC;MACZc,GAAG,EAAEjB;IACP,CAAC,CAAC;IACFkB,GAAG,EAAEnB,QAAQ;IACboB,GAAG,EAAEpB;EACP,CAAC;AACH,CAAC,CAAC;;AAEF;AACA;AACA;AACA,OAAO,MAAMqB,gCAAgC,GAAGnB,CAAC,CAACE,MAAM,CAAC;EACvDkB,KAAK,EAAEpB,CAAC,CAACI,MAAM,CAAC;AAClB,CAAC,CAAC;;AAEF;AACA;AACA;AACA"}
|
@@ -1,12 +1,13 @@
|
|
1
1
|
import { decode as decodeJwt } from "@pagopa/io-react-native-jwt";
|
2
2
|
import { verify as verifyJwt } from "@pagopa/io-react-native-jwt";
|
3
3
|
import { sha256ToBase64 } from "@pagopa/io-react-native-jwt";
|
4
|
-
import { decodeBase64 } from "@pagopa/io-react-native-jwt";
|
5
4
|
import { Disclosure, SdJwt4VC } from "./types";
|
6
5
|
import { verifyDisclosure } from "./verifier";
|
7
6
|
import { ClaimsNotFoundBetweenDislosures, ClaimsNotFoundInToken } from "../utils/errors";
|
7
|
+
import { Base64 } from "js-base64";
|
8
8
|
const decodeDisclosure = encoded => {
|
9
|
-
const
|
9
|
+
const utf8String = Base64.decode(encoded); // Decode Base64 into UTF-8 string
|
10
|
+
const decoded = Disclosure.parse(JSON.parse(utf8String));
|
10
11
|
return {
|
11
12
|
decoded,
|
12
13
|
encoded
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["decode","decodeJwt","verify","verifyJwt","sha256ToBase64","
|
1
|
+
{"version":3,"names":["decode","decodeJwt","verify","verifyJwt","sha256ToBase64","Disclosure","SdJwt4VC","verifyDisclosure","ClaimsNotFoundBetweenDislosures","ClaimsNotFoundInToken","Base64","decodeDisclosure","encoded","utf8String","decoded","parse","JSON","token","customSchema","slice","rawSdJwt","rawDisclosures","split","decodedJwt","parser","sdJwt","header","protectedHeader","payload","disclosures","map","disclose","claims","paths","Promise","all","claim","disclosure","find","_ref","name","hash","_sd","includes","index","indexOf","path","filteredDisclosures","filter","d","disclosedToken","join","publicKey"],"sourceRoot":"../../../src","sources":["sd-jwt/index.ts"],"mappings":"AAEA,SAASA,MAAM,IAAIC,SAAS,QAAQ,6BAA6B;AACjE,SAASC,MAAM,IAAIC,SAAS,QAAQ,6BAA6B;AACjE,SAASC,cAAc,QAAQ,6BAA6B;AAC5D,SAASC,UAAU,EAAEC,QAAQ,QAAoC,SAAS;AAC1E,SAASC,gBAAgB,QAAQ,YAAY;AAE7C,SACEC,+BAA+B,EAC/BC,qBAAqB,QAChB,iBAAiB;AACxB,SAASC,MAAM,QAAQ,WAAW;AAElC,MAAMC,gBAAgB,GAAIC,OAAe,IAA4B;EACnE,MAAMC,UAAU,GAAGH,MAAM,CAACV,MAAM,CAACY,OAAO,CAAC,CAAC,CAAC;EAC3C,MAAME,OAAO,GAAGT,UAAU,CAACU,KAAK,CAACC,IAAI,CAACD,KAAK,CAACF,UAAU,CAAC,CAAC;EACxD,OAAO;IAAEC,OAAO;IAAEF;EAAQ,CAAC;AAC7B,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMZ,MAAM,GAAGA,CACpBiB,KAAa,EACbC,YAAgB,KAIb;EACH;EACA,IAAID,KAAK,CAACE,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE;IAC3BF,KAAK,GAAGA,KAAK,CAACE,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;EAC5B;EACA,MAAM,CAACC,QAAQ,GAAG,EAAE,EAAE,GAAGC,cAAc,CAAC,GAAGJ,KAAK,CAACK,KAAK,CAAC,GAAG,CAAC;;EAE3D;EACA;EACA,MAAMC,UAAU,GAAGtB,SAAS,CAACmB,QAAQ,CAAC;;EAEtC;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L,MAAM,CACjE,CACF,CAAC;EAED,OAAO;IACLP,KAAK,EAAEX,OAAO,CAACW,KAAK;IACpBI,WAAW,EAAEf,OAAO,CAACe,WAAW,CAACC,GAAG,CAAEmB,CAAC,IAAKA,CAAC,CAACnC,OAAO;EACvD,CAAC;AACH,CAAC;AAED,SAASR,QAAQ"}
|
@@ -49,8 +49,15 @@ const ClaimsMetadata = z.record(z.object({
|
|
49
49
|
locale: z.string()
|
50
50
|
}))
|
51
51
|
}));
|
52
|
+
const IssuanceErrorSupported = z.object({
|
53
|
+
display: z.array(z.object({
|
54
|
+
title: z.string(),
|
55
|
+
description: z.string(),
|
56
|
+
locale: z.string()
|
57
|
+
}))
|
58
|
+
});
|
52
59
|
|
53
|
-
// Metadata for a credentia which
|
60
|
+
// Metadata for a credentia which is supported by a Issuer
|
54
61
|
|
55
62
|
const SupportedCredentialMetadata = z.object({
|
56
63
|
format: z.union([z.literal("vc+sd-jwt"), z.literal("vc+mdoc-cbor")]),
|
@@ -59,7 +66,9 @@ const SupportedCredentialMetadata = z.object({
|
|
59
66
|
claims: ClaimsMetadata.optional(),
|
60
67
|
// TODO [SIW-1268]: should not be optional
|
61
68
|
cryptographic_binding_methods_supported: z.array(z.string()),
|
62
|
-
credential_signing_alg_values_supported: z.array(z.string())
|
69
|
+
credential_signing_alg_values_supported: z.array(z.string()),
|
70
|
+
authentic_source: z.string().optional(),
|
71
|
+
issuance_errors_supported: z.record(IssuanceErrorSupported).optional()
|
63
72
|
});
|
64
73
|
export const EntityStatement = z.object({
|
65
74
|
header: z.object({
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["UnixTime","JWK","z","TrustMark","object","id","string","trust_mark","RelyingPartyMetadata","application_type","optional","client_id","client_name","jwks","keys","array","contacts","CredentialDisplayMetadata","name","locale","logo","url","alt_text","background_color","text_color","CredentialIssuerDisplayMetadata","ClaimsMetadata","record","value_type","display","SupportedCredentialMetadata","format","union","literal","scope","claims","cryptographic_binding_methods_supported","credential_signing_alg_values_supported","EntityStatement","header","typ","alg","kid","payload","iss","sub","trust_marks","iat","number","exp","EntityConfigurationHeader","FederationEntityMetadata","federation_fetch_endpoint","federation_list_endpoint","federation_resolve_endpoint","federation_trust_mark_status_endpoint","federation_trust_mark_list_endpoint","organization_name","homepage_uri","policy_uri","logo_uri","passthrough","BaseEntityConfiguration","authority_hints","metadata","federation_entity","TrustAnchorEntityConfiguration","CredentialIssuerEntityConfiguration","and","openid_credential_issuer","credential_issuer","credential_endpoint","revocation_endpoint","status_attestation_endpoint","credential_configurations_supported","oauth_authorization_server","authorization_endpoint","pushed_authorization_request_endpoint","dpop_signing_alg_values_supported","token_endpoint","introspection_endpoint","client_registration_types_supported","code_challenge_methods_supported","authorization_details_types_supported","acr_values_supported","grant_types_supported","issuer","scopes_supported","request_parameter_supported","boolean","request_uri_parameter_supported","response_types_supported","response_modes_supported","subject_types_supported","token_endpoint_auth_methods_supported","token_endpoint_auth_signing_alg_values_supported","request_object_signing_alg_values_supported","wallet_relying_party","RelyingPartyEntityConfiguration","WalletProviderEntityConfiguration","wallet_provider","aal_values_supported","EntityConfiguration","description"],"sourceRoot":"../../../src","sources":["trust/types.ts"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,iBAAiB;AAC1C,SAASC,GAAG,QAAQ,cAAc;AAClC,OAAO,KAAKC,CAAC,MAAM,KAAK;AAExB,OAAO,MAAMC,SAAS,GAAGD,CAAC,CAACE,MAAM,CAAC;EAAEC,EAAE,EAAEH,CAAC,CAACI,MAAM,CAAC,CAAC;EAAEC,UAAU,EAAEL,CAAC,CAACI,MAAM,CAAC;AAAE,CAAC,CAAC;AAG7E,MAAME,oBAAoB,GAAGN,CAAC,CAACE,MAAM,CAAC;EACpCK,gBAAgB,EAAEP,CAAC,CAACI,MAAM,CAAC,CAAC,CAACI,QAAQ,CAAC,CAAC;EACvCC,SAAS,EAAET,CAAC,CAACI,MAAM,CAAC,CAAC,CAACI,QAAQ,CAAC,CAAC;EAChCE,WAAW,EAA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ACa,KAAK,CAACd,GAAG;QAAE,CAAC;MACvC,CAAC,CAAC,CACD4D,WAAW,CAAC;IACjB,CAAC;EACH,CAAC;AACH,CAAC,CACH,CAAC;;AAED;;AAEA,OAAO,MAAMyC,mBAAmB,GAAGpG,CAAC,CAAC8B,KAAK,CACxC,CACEmE,iCAAiC,EACjChC,mCAAmC,EACnCD,8BAA8B,EAC9BgC,+BAA+B,CAChC,EACD;EACEK,WAAW,EAAE;AACf,CACF,CAAC"}
|
1
|
+
{"version":3,"names":["UnixTime","JWK","z","TrustMark","object","id","string","trust_mark","RelyingPartyMetadata","application_type","optional","client_id","client_name","jwks","keys","array","contacts","CredentialDisplayMetadata","name","locale","logo","url","alt_text","background_color","text_color","CredentialIssuerDisplayMetadata","ClaimsMetadata","record","value_type","display","IssuanceErrorSupported","title","description","SupportedCredentialMetadata","format","union","literal","scope","claims","cryptographic_binding_methods_supported","credential_signing_alg_values_supported","authentic_source","issuance_errors_supported","EntityStatement","header","typ","alg","kid","payload","iss","sub","trust_marks","iat","number","exp","EntityConfigurationHeader","FederationEntityMetadata","federation_fetch_endpoint","federation_list_endpoint","federation_resolve_endpoint","federation_trust_mark_status_endpoint","federation_trust_mark_list_endpoint","organization_name","homepage_uri","policy_uri","logo_uri","passthrough","BaseEntityConfiguration","authority_hints","metadata","federation_entity","TrustAnchorEntityConfiguration","CredentialIssuerEntityConfiguration","and","openid_credential_issuer","credential_issuer","credential_endpoint","revocation_endpoint","status_attestation_endpoint","credential_configurations_supported","oauth_authorization_server","authorization_endpoint","pushed_authorization_request_endpoint","dpop_signing_alg_values_supported","token_endpoint","introspection_endpoint","client_registration_types_supported","code_challenge_methods_supported","authorization_details_types_supported","acr_values_supported","grant_types_supported","issuer","scopes_supported","request_parameter_supported","boolean","request_uri_parameter_supported","response_types_supported","response_modes_supported","subject_types_supported","token_endpoint_auth_methods_supported","token_endpoint_auth_signing_alg_values_supported","request_object_signing_alg_values_supported","wallet_relying_party","RelyingPartyEntityConfiguration","WalletProviderEntityConfiguration","wallet_provider","aal_values_supported","EntityConfiguration"],"sourceRoot":"../../../src","sources":["trust/types.ts"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,iBAAiB;AAC1C,SAASC,GAAG,QAAQ,cAAc;AAClC,OAAO,KAAKC,CAAC,MAAM,KAAK;AAExB,OAAO,MAAMC,SAAS,GAAGD,CAAC,CAACE,MAAM,CAAC;EAAEC,EAAE,EAAEH,CAAC,CAACI,MAAM,CAAC,CAAC;EAAEC,UAAU,EAAEL,CAAC,CAACI,MAAM,CAAC;AAAE,CAAC,CAAC;AAG7E,MAAME,oBAAoB,GAAGN,CAAC,CAACE,MAAM,CAAC;EACpCK,gBAAgB,EAAEP,CAAC,CAACI,MAAM,CAAC,CAAC,CAACI,QAAQ,CAAC,CAAC;EACvCC,SAAS,EAAET,CAAC,CAACI,MAAM,CAAC,CAAC,CAACI,QAAQ,CAAC,CAAC;EAChCE,WAAW,EAAEV,CAAC,CAACI,MAAM,CAAC,CAAC,CAACI,QAAQ,CAAC,CAAC;EAClCG,IAAI,EAAEX,CAAC,CAACE,MAAM,CAAC;IAAEU,IAAI,EAAEZ,CAAC,CAACa,KAAK,CAACd,GAAG;EAAE,CAAC,CAAC;EACtCe,QAAQ,EAAEd,CAAC,CAACa,KAAK,CAACb,CAAC,CAACI,MAAM,CAAC,CAAC,CAAC,CAACI,QAAQ,CAAC;AACzC,CAAC,CAAC;AACF;;AAEA;AACA;AAEA,MAAMO,yBAAyB,GAAGf,CAAC,CAACE,MAAM,CAAC;EACzCc,IAAI,EAAEhB,CAAC,CAACI,MAAM,CAAC,CAAC;EAChBa,MAAM,EAAEjB,CAAC,CAACI,MAAM,CAAC,CAAC;EAClBc,IAAI,EAAElB,CAAC,CACJE,MAAM,CAAC;IACNiB,GAAG,EAAEnB,CAAC,CAACI,MAAM,CAAC,CAAC;IACfgB,QAAQ,EAAEpB,CAAC,CAACI,MAAM,CAAC;EACrB,CAAC,CAAC,CACDI,QAAQ,CAAC,CAAC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ACxC,CACEqE,iCAAiC,EACjChC,mCAAmC,EACnCD,8BAA8B,EAC9BgC,+BAA+B,CAChC,EACD;EACEvE,WAAW,EAAE;AACf,CACF,CAAC"}
|
@@ -52,12 +52,15 @@ export class UnexpectedStatusCodeError extends IoWalletError {
|
|
52
52
|
|
53
53
|
/** HTTP status code */
|
54
54
|
|
55
|
-
|
55
|
+
/** The stringified response body, useful to process the error response */
|
56
|
+
|
57
|
+
constructor(message, statusCode, responseBody) {
|
56
58
|
super(serializeAttrs({
|
57
59
|
message,
|
58
60
|
statusCode: statusCode.toString()
|
59
61
|
}));
|
60
62
|
this.statusCode = statusCode;
|
63
|
+
this.responseBody = responseBody;
|
61
64
|
}
|
62
65
|
}
|
63
66
|
/**
|
@@ -423,19 +426,26 @@ export class OperationAbortedError extends IoWalletError {
|
|
423
426
|
}
|
424
427
|
|
425
428
|
/**
|
426
|
-
* Error subclass thrown when
|
429
|
+
* Error subclass thrown when a credential status is invalid, either during issuance or when requesting a status attestation.
|
427
430
|
*/
|
428
|
-
export class
|
431
|
+
export class CredentialInvalidStatusError extends IoWalletError {
|
429
432
|
static get code() {
|
430
|
-
return "
|
433
|
+
return "ERR_CREDENTIAL_INVALID_STATUS";
|
431
434
|
}
|
432
|
-
code = "
|
433
|
-
|
434
|
-
|
435
|
+
code = "ERR_CREDENTIAL_INVALID_STATUS";
|
436
|
+
|
437
|
+
/**
|
438
|
+
* The error code that should be mapped with one of the `issuance_errors_supported` in the EC.
|
439
|
+
*/
|
440
|
+
|
441
|
+
constructor(message, errorCode) {
|
442
|
+
let reason = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "unspecified";
|
435
443
|
super(serializeAttrs({
|
436
444
|
message,
|
445
|
+
errorCode,
|
437
446
|
reason
|
438
447
|
}));
|
448
|
+
this.errorCode = errorCode;
|
439
449
|
this.reason = reason;
|
440
450
|
}
|
441
451
|
}
|
@@ -458,24 +468,6 @@ export class StatusAttestationError extends IoWalletError {
|
|
458
468
|
}
|
459
469
|
}
|
460
470
|
|
461
|
-
/**
|
462
|
-
* Error subclass thrown when the the user is not entitled to receive the requested credential.
|
463
|
-
*/
|
464
|
-
export class CredentialNotEntitledError extends IoWalletError {
|
465
|
-
static get code() {
|
466
|
-
return "CREDENTIAL_NOT_ENTITLED_ERROR";
|
467
|
-
}
|
468
|
-
code = "CREDENTIAL_NOT_ENTITLED_ERROR";
|
469
|
-
constructor(message) {
|
470
|
-
let reason = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "unspecified";
|
471
|
-
super(serializeAttrs({
|
472
|
-
message,
|
473
|
-
reason
|
474
|
-
}));
|
475
|
-
this.reason = reason;
|
476
|
-
}
|
477
|
-
}
|
478
|
-
|
479
471
|
/**
|
480
472
|
* Error subclass thrown when an error occurs while requesting a credential.
|
481
473
|
*/
|
@@ -511,4 +503,39 @@ export class CredentialIssuingNotSynchronousError extends IoWalletError {
|
|
511
503
|
this.reason = reason;
|
512
504
|
}
|
513
505
|
}
|
506
|
+
/**
|
507
|
+
* Function to extract the error message from the Entity Configuration's supported error codes.
|
508
|
+
* @param errorCode The error code to map to a meaningful message
|
509
|
+
* @param params.issuerConf The entity configuration for credentials
|
510
|
+
* @param params.credentialType The type of credential the error belongs to
|
511
|
+
* @returns A localized error {@link LocalizedIssuanceError} or undefined
|
512
|
+
* @throws {Error} When no credential config is found
|
513
|
+
*/
|
514
|
+
export function extractErrorMessageFromIssuerConf(errorCode, _ref2) {
|
515
|
+
let {
|
516
|
+
issuerConf,
|
517
|
+
credentialType
|
518
|
+
} = _ref2;
|
519
|
+
const credentialConfiguration = issuerConf.openid_credential_issuer.credential_configurations_supported[credentialType];
|
520
|
+
if (!credentialConfiguration) {
|
521
|
+
throw new Error(`No configuration found for ${credentialType} in the provided EC`);
|
522
|
+
}
|
523
|
+
const {
|
524
|
+
issuance_errors_supported
|
525
|
+
} = credentialConfiguration;
|
526
|
+
if (!(issuance_errors_supported !== null && issuance_errors_supported !== void 0 && issuance_errors_supported[errorCode])) {
|
527
|
+
return undefined;
|
528
|
+
}
|
529
|
+
const localesList = issuance_errors_supported[errorCode].display;
|
530
|
+
return localesList.reduce((acc, _ref3) => {
|
531
|
+
let {
|
532
|
+
locale,
|
533
|
+
...rest
|
534
|
+
} = _ref3;
|
535
|
+
return {
|
536
|
+
...acc,
|
537
|
+
[locale]: rest
|
538
|
+
};
|
539
|
+
}, {});
|
540
|
+
}
|
514
541
|
//# sourceMappingURL=errors.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["serializeAttrs","attrs","Object","entries","map","_ref","k","v","Array","isArray","join","_","IoWalletError","Error","code","constructor","message","_Error$captureStackTr","name","captureStackTrace","call","UnexpectedStatusCodeError","statusCode","toString","ValidationFailed","claim","arguments","length","undefined","reason","WalletInstanceAttestationIssuingError","AuthRequestDecodeError","PidIssuingError","ClaimsNotFoundBetweenDislosures","claims","c","ClaimsNotFoundInToken","NoSuitableKeysFoundInEntityConfiguration","scenario","PidMetadataError","WalletProviderResponseError","WalletInstanceRevokedError","WalletInstanceNotFoundError","WalletInstanceIntegrityFailedError","WalletInstanceCreationError","WalletInstanceCreationIntegrityError","AuthorizationError","AuthorizationIdpError","error","errorDescription","OperationAbortedError","operation","StatusAttestationInvalid","StatusAttestationError","CredentialNotEntitledError","CredentialRequestError","CredentialIssuingNotSynchronousError"],"sourceRoot":"../../../src","sources":["utils/errors.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,cAAc,GACzBC,KAAsC,IAEtCC,MAAM,CAACC,OAAO,CAACF,KAAK,CAAC,CAClBG,GAAG,CAACC,IAAA;EAAA,IAAC,CAACC,CAAC,EAAEC,CAAC,CAAC,GAAAF,IAAA;EAAA,OAAK,CAACC,CAAC,EAAEE,KAAK,CAACC,OAAO,CAACF,CAAC,CAAC,GAAI,IAAGA,CAAC,CAACG,IAAI,CAAC,IAAI,CAAE,GAAE,GAAGH,CAAC,CAAC;AAAA,EAAC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AWA,CAACC,OAAe,EAAkC;IAAA,IAAhCa,MAAc,GAAAH,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,aAAa;IACzD,KAAK,CAAC1B,cAAc,CAAC;MAAEgB,OAAO;MAAEa;IAAO,CAAC,CAAC,CAAC;IAC1C,IAAI,CAACA,MAAM,GAAGA,MAAM;EACtB;AACF;;AAEA;AACA;AACA;AACA,OAAO,MAAM0B,sBAAsB,SAAS3C,aAAa,CAAC;EACxD,WAAWE,IAAIA,CAAA,EAA+B;IAC5C,OAAO,0BAA0B;EACnC;EAEAA,IAAI,GAAG,0BAA0B;EAIjCC,WAAWA,CAACC,OAAe,EAAkC;IAAA,IAAhCa,MAAc,GAAAH,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,aAAa;IACzD,KAAK,CAAC1B,cAAc,CAAC;MAAEgB,OAAO;MAAEa;IAAO,CAAC,CAAC,CAAC;IAC1C,IAAI,CAACA,MAAM,GAAGA,MAAM;EACtB;AACF;;AAEA;AACA;AACA;AACA,OAAO,MAAM2B,oCAAoC,SAAS5C,aAAa,CAAC;EACtE,WAAWE,IAAIA,CAAA,EAA+C;IAC5D,OAAO,0CAA0C;EACnD;EAEAA,IAAI,GAAG,0CAA0C;EAIjDC,WAAWA,CAACC,OAAe,EAAkC;IAAA,IAAhCa,MAAc,GAAAH,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,aAAa;IACzD,KAAK,CAAC1B,cAAc,CAAC;MAAEgB,OAAO;MAAEa;IAAO,CAAC,CAAC,CAAC;IAC1C,IAAI,CAACA,MAAM,GAAGA,MAAM;EACtB;AACF"}
|
1
|
+
{"version":3,"names":["serializeAttrs","attrs","Object","entries","map","_ref","k","v","Array","isArray","join","_","IoWalletError","Error","code","constructor","message","_Error$captureStackTr","name","captureStackTrace","call","UnexpectedStatusCodeError","statusCode","responseBody","toString","ValidationFailed","claim","arguments","length","undefined","reason","WalletInstanceAttestationIssuingError","AuthRequestDecodeError","PidIssuingError","ClaimsNotFoundBetweenDislosures","claims","c","ClaimsNotFoundInToken","NoSuitableKeysFoundInEntityConfiguration","scenario","PidMetadataError","WalletProviderResponseError","WalletInstanceRevokedError","WalletInstanceNotFoundError","WalletInstanceIntegrityFailedError","WalletInstanceCreationError","WalletInstanceCreationIntegrityError","AuthorizationError","AuthorizationIdpError","error","errorDescription","OperationAbortedError","operation","CredentialInvalidStatusError","errorCode","StatusAttestationError","CredentialRequestError","CredentialIssuingNotSynchronousError","extractErrorMessageFromIssuerConf","_ref2","issuerConf","credentialType","credentialConfiguration","openid_credential_issuer","credential_configurations_supported","issuance_errors_supported","localesList","display","reduce","acc","_ref3","locale","rest"],"sourceRoot":"../../../src","sources":["utils/errors.ts"],"mappings":"AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,cAAc,GACzBC,KAAsC,IAEtCC,MAAM,CAACC,OAAO,CAACF,KAAK,CAAC,CAClBG,GAAG,CAACC,IAAA;EAAA,IAAC,CAACC,CAAC,EAAEC,CAAC,CAAC,GAAAF,IAAA;EAAA,OAAK,CAACC,CAAC,EAAEE,KAAK,CAACC,OAAO,CAACF,CAAC,CAAC,GAAI,IAAGA,CAAC,CAACG,IAAI,CAAC,IAAI,CAAE,GAAE,GAAGH,CAAC,CAAC;AAAA,EAAC,CAChEH,GAAG,CAAEO,CAAC,IAAKA,CAAC,CAACD,IAAI,CAAC,GAAG,CAAC,CAAC,CACvBA,IAAI,CAAC,GAAG,CAAC;;AAEd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAME,aAAa,SAASC,KAAK,CAAC;EACvC;EACA,WAAWC,IAAIA,CAAA,EAAW;IACxB,OAAO,uBAAuB;EAChC;;EAEA;EACAA,IAAI,GAAW,uBAAuB;EAEtCC,WAAWA,CAACC,OAAgB,EAA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E,CAACE,MAAM,GAAGC;IAAK,CAAC;EAAA,CAAC,EAC1D,CAAC,CACH,CAAC;AACH"}
|
package/lib/module/utils/misc.js
CHANGED
@@ -9,7 +9,8 @@ import { sha256 } from "js-sha256";
|
|
9
9
|
*/
|
10
10
|
export const hasStatus = status => async res => {
|
11
11
|
if (res.status !== status) {
|
12
|
-
|
12
|
+
const responseBody = await res.text();
|
13
|
+
throw new UnexpectedStatusCodeError(`Http request failed. Expected ${status}, got ${res.status}, url: ${res.url} with response: ${responseBody}`, res.status, responseBody);
|
13
14
|
}
|
14
15
|
return res;
|
15
16
|
};
|
@@ -80,4 +81,11 @@ export const createAbortPromiseFromSignal = signal => {
|
|
80
81
|
};
|
81
82
|
};
|
82
83
|
export const isDefined = x => Boolean(x);
|
84
|
+
export const safeJsonParse = (text, withDefault) => {
|
85
|
+
try {
|
86
|
+
return JSON.parse(text);
|
87
|
+
} catch (_) {
|
88
|
+
return withDefault ?? null;
|
89
|
+
}
|
90
|
+
};
|
83
91
|
//# sourceMappingURL=misc.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["IoWalletError","UnexpectedStatusCodeError","sha256","hasStatus","status","res","
|
1
|
+
{"version":3,"names":["IoWalletError","UnexpectedStatusCodeError","sha256","hasStatus","status","res","responseBody","text","url","generateRandomAlphaNumericString","size","Array","from","Math","floor","random","toString","join","until","conditionFunction","timeoutSeconds","Promise","resolve","reject","start","Date","now","poll","undefined","Error","setTimeout","getCredentialHashWithouDiscloures","credential","tildeIndex","indexOf","slice","createAbortPromiseFromSignal","signal","listener","listen","aborted","addEventListener","remove","removeEventListener","isDefined","x","Boolean","safeJsonParse","withDefault","JSON","parse","_"],"sourceRoot":"../../../src","sources":["utils/misc.ts"],"mappings":"AAAA,SAASA,aAAa,EAAEC,yBAAyB,QAAQ,UAAU;AACnE,SAASC,MAAM,QAAQ,WAAW;;AAElC;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,SAAS,GACnBC,MAAc,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../../../../src/credential/issuance/06-obtain-credential.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,aAAa,EACnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,
|
1
|
+
{"version":3,"file":"06-obtain-credential.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/06-obtain-credential.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,aAAa,EACnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAA4B,KAAK,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAQ5E,OAAO,EAAqC,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAKhF,MAAM,MAAM,gBAAgB,GAAG,CAC7B,UAAU,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAC,YAAY,CAAC,EAClD,WAAW,EAAE,GAAG,CAAC,eAAe,CAAC,CAAC,aAAa,CAAC,EAChD,QAAQ,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,UAAU,CAAC,EACjD,oBAAoB,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,sBAAsB,CAAC,EACzE,OAAO,EAAE;IACP,iBAAiB,EAAE,aAAa,CAAC;IACjC,uBAAuB,EAAE,aAAa,CAAC;IACvC,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,KACE,OAAO,CAAC,kBAAkB,CAAC,CAAC;AAEjC,eAAO,MAAM,gBAAgB,UACpB,MAAM,UACL,MAAM,YACJ,MAAM,OACX,aAAa,KACjB,QAAQ,MAAM,CAehB,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,gBAAgB,EAAE,gBAkF9B,CAAC"}
|
@@ -70,4 +70,12 @@ export declare const ResponseUriResultShape: z.ZodObject<{
|
|
70
70
|
redirect_uri: string;
|
71
71
|
}>;
|
72
72
|
export type ResponseMode = "query" | "form_post.jwt";
|
73
|
+
export declare const CredentialIssuanceFailureResponse: z.ZodObject<{
|
74
|
+
error: z.ZodString;
|
75
|
+
}, "strip", z.ZodTypeAny, {
|
76
|
+
error: string;
|
77
|
+
}, {
|
78
|
+
error: string;
|
79
|
+
}>;
|
80
|
+
export type CredentialIssuanceFailureResponse = z.infer<typeof CredentialIssuanceFailureResponse>;
|
73
81
|
//# sourceMappingURL=types.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAE1D,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOxB,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEpE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;EAK7B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;EAEjC,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,eAAe,CAAC"}
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAE1D,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOxB,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEpE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;EAK7B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;EAEjC,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,eAAe,CAAC;AAErD,eAAO,MAAM,iCAAiC;;;;;;EAE5C,CAAC;AAEH,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CACrD,OAAO,iCAAiC,CACzC,CAAC"}
|
@@ -12,7 +12,7 @@ export type StatusAttestation = (issuerConf: Out<EvaluateIssuerTrust>["issuerCon
|
|
12
12
|
* @param credential - The credential to be verified
|
13
13
|
* @param credentialCryptoContext - The credential's crypto context
|
14
14
|
* @param context.appFetch (optional) fetch api implementation. Default: built-in fetch
|
15
|
-
* @throws {@link
|
15
|
+
* @throws {@link CredentialInvalidStatusError} if the status attestation is invalid and thus the credential is not valid
|
16
16
|
* @throws {@link StatusAttestationError} if an error occurs during the status attestation
|
17
17
|
* @returns The credential status attestation
|
18
18
|
*/
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"02-status-attestation.d.ts","sourceRoot":"","sources":["../../../../src/credential/status/02-status-attestation.ts"],"names":[],"mappings":"AAAA,OAAO,
|
1
|
+
{"version":3,"file":"02-status-attestation.d.ts","sourceRoot":"","sources":["../../../../src/credential/status/02-status-attestation.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,GAAG,EACT,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACzE,OAAO,EAAW,KAAK,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE1E,OAAO,EAEL,yBAAyB,EAC1B,MAAM,SAAS,CAAC;AAOjB,MAAM,MAAM,iBAAiB,GAAG,CAC9B,UAAU,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAC,YAAY,CAAC,EAClD,UAAU,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC,YAAY,CAAC,EAC/C,uBAAuB,EAAE,aAAa,EACtC,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,KAC5B,OAAO,CAAC;IACX,iBAAiB,EAAE,yBAAyB,CAAC,oBAAoB,CAAC,CAAC;CACpE,CAAC,CAAC;AAEH;;;;;;;;;;GAUG;AACH,eAAO,MAAM,iBAAiB,EAAE,iBA2C/B,CAAC"}
|
@@ -302,4 +302,19 @@ export declare const ParsedStatusAttestation: z.ZodObject<{
|
|
302
302
|
credential_hash: string;
|
303
303
|
};
|
304
304
|
}>;
|
305
|
+
/**
|
306
|
+
* Shape from parsing a status attestation response in case of error.
|
307
|
+
*/
|
308
|
+
export declare const InvalidStatusAttestationResponse: z.ZodObject<{
|
309
|
+
error: z.ZodString;
|
310
|
+
}, "strip", z.ZodTypeAny, {
|
311
|
+
error: string;
|
312
|
+
}, {
|
313
|
+
error: string;
|
314
|
+
}>;
|
315
|
+
/**
|
316
|
+
* Type from parsing a status attestation response in case of error.
|
317
|
+
* Inferred from {@link InvalidStatusAttestationResponse}.
|
318
|
+
*/
|
319
|
+
export type InvalidStatusAttestationResponse = z.infer<typeof InvalidStatusAttestationResponse>;
|
305
320
|
//# sourceMappingURL=types.d.ts.map
|