@pagopa/io-react-native-wallet 0.13.1 → 0.15.0
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/commonjs/cie/component.js +180 -0
- package/lib/commonjs/cie/component.js.map +1 -0
- package/lib/commonjs/cie/error.js +44 -0
- package/lib/commonjs/cie/error.js.map +1 -0
- package/lib/commonjs/cie/index.js +32 -0
- package/lib/commonjs/cie/index.js.map +1 -0
- package/lib/commonjs/cie/manager.js +142 -0
- package/lib/commonjs/cie/manager.js.map +1 -0
- package/lib/commonjs/client/index.js +5 -2
- package/lib/commonjs/client/index.js.map +1 -1
- package/lib/commonjs/credential/issuance/04-complete-user-authorization.js +144 -19
- package/lib/commonjs/credential/issuance/04-complete-user-authorization.js.map +1 -1
- package/lib/commonjs/credential/issuance/07-verify-and-parse-credential.js +12 -4
- package/lib/commonjs/credential/issuance/07-verify-and-parse-credential.js.map +1 -1
- package/lib/commonjs/credential/issuance/index.js +18 -0
- package/lib/commonjs/credential/issuance/index.js.map +1 -1
- package/lib/commonjs/credential/issuance/types.js +9 -1
- package/lib/commonjs/credential/issuance/types.js.map +1 -1
- package/lib/commonjs/index.js +3 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/trust/types.js +5 -3
- package/lib/commonjs/trust/types.js.map +1 -1
- package/lib/commonjs/utils/decoder.js +28 -19
- package/lib/commonjs/utils/decoder.js.map +1 -1
- package/lib/module/cie/component.js +171 -0
- package/lib/module/cie/component.js.map +1 -0
- package/lib/module/cie/error.js +36 -0
- package/lib/module/cie/error.js.map +1 -0
- package/lib/module/cie/index.js +4 -0
- package/lib/module/cie/index.js.map +1 -0
- package/lib/module/cie/manager.js +133 -0
- package/lib/module/cie/manager.js.map +1 -0
- package/lib/module/client/index.js +5 -2
- package/lib/module/client/index.js.map +1 -1
- package/lib/module/credential/issuance/04-complete-user-authorization.js +141 -18
- package/lib/module/credential/issuance/04-complete-user-authorization.js.map +1 -1
- package/lib/module/credential/issuance/07-verify-and-parse-credential.js +12 -4
- package/lib/module/credential/issuance/07-verify-and-parse-credential.js.map +1 -1
- package/lib/module/credential/issuance/index.js +2 -2
- package/lib/module/credential/issuance/index.js.map +1 -1
- package/lib/module/credential/issuance/types.js +7 -0
- package/lib/module/credential/issuance/types.js.map +1 -1
- package/lib/module/index.js +2 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/trust/types.js +5 -3
- package/lib/module/trust/types.js.map +1 -1
- package/lib/module/utils/decoder.js +28 -19
- package/lib/module/utils/decoder.js.map +1 -1
- package/lib/typescript/cie/component.d.ts +46 -0
- package/lib/typescript/cie/component.d.ts.map +1 -0
- package/lib/typescript/cie/error.d.ts +31 -0
- package/lib/typescript/cie/error.d.ts.map +1 -0
- package/lib/typescript/cie/index.d.ts +4 -0
- package/lib/typescript/cie/index.d.ts.map +1 -0
- package/lib/typescript/cie/manager.d.ts +5 -0
- package/lib/typescript/cie/manager.d.ts.map +1 -0
- package/lib/typescript/client/index.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/04-complete-user-authorization.d.ts +48 -1
- package/lib/typescript/credential/issuance/04-complete-user-authorization.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/07-verify-and-parse-credential.d.ts +1 -0
- package/lib/typescript/credential/issuance/07-verify-and-parse-credential.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/index.d.ts +3 -3
- package/lib/typescript/credential/issuance/index.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/types.d.ts +10 -0
- package/lib/typescript/credential/issuance/types.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +2 -1
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/trust/index.d.ts +14 -14
- package/lib/typescript/trust/types.d.ts +142 -142
- package/lib/typescript/trust/types.d.ts.map +1 -1
- package/lib/typescript/utils/decoder.d.ts.map +1 -1
- package/package.json +6 -2
- package/src/cie/component.tsx +216 -0
- package/src/cie/error.ts +58 -0
- package/src/cie/index.ts +4 -0
- package/src/cie/manager.ts +183 -0
- package/src/client/index.ts +4 -1
- package/src/credential/issuance/04-complete-user-authorization.ts +216 -21
- package/src/credential/issuance/07-verify-and-parse-credential.ts +14 -6
- package/src/credential/issuance/index.ts +10 -0
- package/src/credential/issuance/types.ts +7 -0
- package/src/index.ts +2 -0
- package/src/trust/types.ts +8 -6
- package/src/utils/decoder.ts +28 -19
- package/lib/commonjs/credential/issuance/03-start-credential-issuance.js +0 -287
- package/lib/commonjs/credential/issuance/03-start-credential-issuance.js.map +0 -1
- package/lib/module/credential/issuance/03-start-credential-issuance.js +0 -276
- package/lib/module/credential/issuance/03-start-credential-issuance.js.map +0 -1
- package/lib/typescript/credential/issuance/03-start-credential-issuance.d.ts +0 -41
- package/lib/typescript/credential/issuance/03-start-credential-issuance.d.ts.map +0 -1
- package/src/credential/issuance/03-start-credential-issuance.ts +0 -407
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_auth","require","_misc","_parseUrl","_interopRequireDefault","_errors","_reactNative","obj","__esModule","default","completeUserAuthorizationWithQueryMode","issuerRequestUri","clientId","issuerConf","idpHint","redirectUri","authorizationContext","authzRequestEndpoint","oauth_authorization_server","authorization_endpoint","params","URLSearchParams","client_id","request_uri","idphint","authUrl","authRedirectUrl","redirectSchema","URL","protocol","replace","authorize","catch","e","AuthorizationError","message","Linking","addEventListener","_ref","url","includes","openAuthUrlInBrowser","openURL","unitAuthRedirectIsNotUndefined","until","undefined","Promise","all","
|
1
|
+
{"version":3,"names":["_auth","require","_misc","_parseUrl","_interopRequireDefault","_errors","_reactNative","_ioReactNativeJwt","_types","_reactNativeUuid","_types2","_decoder","obj","__esModule","default","completeUserAuthorizationWithQueryMode","issuerRequestUri","clientId","issuerConf","idpHint","redirectUri","authorizationContext","authzRequestEndpoint","oauth_authorization_server","authorization_endpoint","params","URLSearchParams","client_id","request_uri","idphint","authUrl","authRedirectUrl","redirectSchema","URL","protocol","replace","authorize","catch","e","AuthorizationError","message","Linking","addEventListener","_ref","url","includes","openAuthUrlInBrowser","openURL","unitAuthRedirectIsNotUndefined","until","undefined","Promise","all","query","parseUrl","parseAuthroizationResponse","exports","getRequestedCredentialToBePresented","appFetch","arguments","length","fetch","requestObject","toString","method","then","hasStatus","res","text","jws","decode","reqObj","RequestObject","safeParse","payload","success","ValidationFailed","error","data","completeUserAuthorizationWithFormPostJwtMode","ctx","wiaCryptoContext","pidCryptoContext","pid","walletInstanceAttestation","wiaWpToken","SignJWT","setProtectedHeader","alg","typ","setPayload","vp","jti","uuid","v4","nonce","setIssuedAt","setExpirationTime","setAudience","response_uri","sign","pidWpToken","presentationSubmission","definition_id","id","descriptor_map","path","format","authzResponsePayload","encodeBase64","JSON","stringify","state","presentation_submission","vp_token","body","response","resUriRes","headers","reqUri","json","responseUri","ResponseUriResultShape","redirect_uri","getJwtFromFormPost","cbRes","decodedJwt","authRes","authResParsed","AuthorizationResultShape","authErr","AuthorizationErrorShape","AuthorizationIdpError","error_description"],"sourceRoot":"../../../../src","sources":["credential/issuance/04-complete-user-authorization.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAMA,IAAAC,KAAA,GAAAD,OAAA;AAEA,IAAAE,SAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AAMA,IAAAK,YAAA,GAAAL,OAAA;AACA,IAAAM,iBAAA,GAAAN,OAAA;AAMA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,gBAAA,GAAAL,sBAAA,CAAAH,OAAA;AACA,IAAAS,OAAA,GAAAT,OAAA;AACA,IAAAU,QAAA,GAAAV,OAAA;AAAgE,SAAAG,uBAAAQ,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAEhE;AACA;AACA;;AA4BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMG,sCAA8E,GACzF,MAAAA,CACEC,gBAAgB,EAChBC,QAA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C,WAAW,CAAC5C,KAAK,CAACrC,OACpB,CAAC;EACH;EAEA,OAAO,MAAMkB,QAAQ,CAAC+D,WAAW,CAAC3C,IAAI,CAAC6C,YAAY,CAAC,CACjD1D,IAAI,CAAC,IAAAC,eAAS,EAAC,GAAG,CAAC,CAAC,CACpBD,IAAI,CAAEE,GAAG,IAAKA,GAAG,CAACC,IAAI,CAAC,CAAC,CAAC,CACzBH,IAAI,CAAC2D,2BAAkB,CAAC,CACxB3D,IAAI,CAAE4D,KAAK,IAAKtE,0BAA0B,CAACsE,KAAK,CAACC,UAAU,CAACpD,OAAO,CAAC,CAAC;AAC1E,CAAC;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AANAlB,OAAA,CAAAuB,4CAAA,GAAAA,4CAAA;AAOO,MAAMxB,0BAA0B,GACrCwE,OAAgB,IACQ;EACxB,MAAMC,aAAa,GAAGC,8BAAwB,CAACxD,SAAS,CAACsD,OAAO,CAAC;EACjE,IAAI,CAACC,aAAa,CAACrD,OAAO,EAAE;IAC1B,MAAMuD,OAAO,GAAGC,6BAAuB,CAAC1D,SAAS,CAACsD,OAAO,CAAC;IAC1D,IAAI,CAACG,OAAO,CAACvD,OAAO,EAAE;MACpB,MAAM,IAAIpC,0BAAkB,CAACyF,aAAa,CAACnD,KAAK,CAACrC,OAAO,CAAC,CAAC,CAAC;IAC7D;;IACA,MAAM,IAAI4F,6BAAqB,CAC7BF,OAAO,CAACpD,IAAI,CAACD,KAAK,EAClBqD,OAAO,CAACpD,IAAI,CAACuD,iBACf,CAAC;EACH;EACA,OAAOL,aAAa,CAAClD,IAAI;AAC3B,CAAC;AAACtB,OAAA,CAAAD,0BAAA,GAAAA,0BAAA"}
|
@@ -11,11 +11,12 @@ var _sdJwt = require("../../sd-jwt");
|
|
11
11
|
|
12
12
|
// handy alias
|
13
13
|
|
14
|
-
const parseCredentialSdJwt = (credentials_supported, _ref)
|
14
|
+
const parseCredentialSdJwt = function (credentials_supported, _ref) {
|
15
15
|
let {
|
16
16
|
sdJwt,
|
17
17
|
disclosures
|
18
18
|
} = _ref;
|
19
|
+
let ignoreMissingAttributes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
19
20
|
const credentialSubject = credentials_supported[sdJwt.payload.vct];
|
20
21
|
if (!credentialSubject) {
|
21
22
|
throw new _errors.IoWalletError("Credential type not supported by the issuer");
|
@@ -25,6 +26,10 @@ const parseCredentialSdJwt = (credentials_supported, _ref) => {
|
|
25
26
|
}
|
26
27
|
|
27
28
|
// transfrom a record { key: value } in an iterable of pairs [key, value]
|
29
|
+
if (!credentialSubject.claims) {
|
30
|
+
throw new _errors.IoWalletError("Missing claims in the credential subject"); // TODO [SIW-1268]: should not be optional
|
31
|
+
}
|
32
|
+
|
28
33
|
const attrDefinitions = Object.entries(credentialSubject.claims);
|
29
34
|
|
30
35
|
// the key of the attribute defintion must match the disclosure's name
|
@@ -38,7 +43,9 @@ const parseCredentialSdJwt = (credentials_supported, _ref) => {
|
|
38
43
|
if (attrsNotInDisclosures.length > 0) {
|
39
44
|
const missing = attrsNotInDisclosures.map(_ => _[0 /* key */]).join(", ");
|
40
45
|
const received = disclosures.map(_ => _[1 /* name */]).join(", ");
|
41
|
-
|
46
|
+
if (!ignoreMissingAttributes) {
|
47
|
+
throw new _errors.IoWalletError(`Some attributes are missing in the credential. Missing: [${missing}], received: [${received}]`);
|
48
|
+
}
|
42
49
|
}
|
43
50
|
|
44
51
|
// attributes that are defined in the issuer configuration
|
@@ -122,10 +129,11 @@ async function verifyCredentialSdJwt(rawCredential, issuerKeys, holderBindingCon
|
|
122
129
|
|
123
130
|
const verifyAndParseCredentialSdJwt = async (issuerConf, credential, _, _ref8) => {
|
124
131
|
let {
|
125
|
-
credentialCryptoContext
|
132
|
+
credentialCryptoContext,
|
133
|
+
ignoreMissingAttributes
|
126
134
|
} = _ref8;
|
127
135
|
const decoded = await verifyCredentialSdJwt(credential, issuerConf.openid_credential_issuer.jwks.keys, credentialCryptoContext);
|
128
|
-
const parsedCredential = parseCredentialSdJwt(issuerConf.openid_credential_issuer.credential_configurations_supported, decoded);
|
136
|
+
const parsedCredential = parseCredentialSdJwt(issuerConf.openid_credential_issuer.credential_configurations_supported, decoded, ignoreMissingAttributes);
|
129
137
|
return {
|
130
138
|
parsedCredential
|
131
139
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_errors","require","_types","_sdJwt","parseCredentialSdJwt","credentials_supported","_ref","sdJwt","disclosures","credentialSubject","payload","vct","IoWalletError","format","header","typ","attrDefinitions","Object","entries","
|
1
|
+
{"version":3,"names":["_errors","require","_types","_sdJwt","parseCredentialSdJwt","credentials_supported","_ref","sdJwt","disclosures","ignoreMissingAttributes","arguments","length","undefined","credentialSubject","payload","vct","IoWalletError","format","header","typ","claims","attrDefinitions","Object","entries","attrsNotInDisclosures","filter","_ref2","attrKey","some","_ref3","name","missing","map","_","join","received","definedValues","fromEntries","_ref4","_disclosures$find","definition","value","find","_ref5","display","reduce","names","_ref6","locale","undefinedValues","keys","includes","_ref7","key","verifyCredentialSdJwt","rawCredential","issuerKeys","holderBindingContext","decodedCredential","holderBindingKey","Promise","all","verifySdJwt","SdJwt4VC","getPublicKey","cnf","jwk","kid","verifyAndParseCredentialSdJwt","issuerConf","credential","_ref8","credentialCryptoContext","decoded","openid_credential_issuer","jwks","parsedCredential","credential_configurations_supported","verifyAndParseCredential","context","exports"],"sourceRoot":"../../../../src","sources":["credential/issuance/07-verify-and-parse-credential.ts"],"mappings":";;;;;;AAEA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAeA;;AAkBA;;AAKA,MAAMG,oBAAoB,GAAG,SAAAA,CAE3BC,qBAAgI,EAAAC,IAAA,EAG3G;EAAA,IAFrB;IAAEC,KAAK;IAAEC;EAAoC,CAAC,GAAAF,IAAA;EAAA,IAC9CG,uBAAgC,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAA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oBAAoB,CAC3CiE,UAAU,CAACK,wBAAwB,CAACG,mCAAmC,EACvEJ,OAAO,EACPhE,uBACF,CAAC;EAED,OAAO;IAAEmE;EAAiB,CAAC;AAC7B,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAME,wBAAkD,GAAG,MAAAA,CAChET,UAAU,EACVC,UAAU,EACVrD,MAAM,EACN8D,OAAO,KACJ;EACH,IAAI9D,MAAM,KAAK,WAAW,EAAE;IAC1B,OAAOmD,6BAA6B,CAClCC,UAAU,EACVC,UAAU,EACVrD,MAAM,EACN8D,OACF,CAAC;EACH;EAEA,MAAM,IAAI/D,qBAAa,CAAE,kCAAiCC,MAAO,EAAC,CAAC;AACrE,CAAC;AAAC+D,OAAA,CAAAF,wBAAA,GAAAA,wBAAA"}
|
@@ -9,6 +9,12 @@ Object.defineProperty(exports, "authorizeAccess", {
|
|
9
9
|
return _authorizeAccess.authorizeAccess;
|
10
10
|
}
|
11
11
|
});
|
12
|
+
Object.defineProperty(exports, "completeUserAuthorizationWithFormPostJwtMode", {
|
13
|
+
enumerable: true,
|
14
|
+
get: function () {
|
15
|
+
return _completeUserAuthorization.completeUserAuthorizationWithFormPostJwtMode;
|
16
|
+
}
|
17
|
+
});
|
12
18
|
Object.defineProperty(exports, "completeUserAuthorizationWithQueryMode", {
|
13
19
|
enumerable: true,
|
14
20
|
get: function () {
|
@@ -21,12 +27,24 @@ Object.defineProperty(exports, "evaluateIssuerTrust", {
|
|
21
27
|
return _evaluateIssuerTrust.evaluateIssuerTrust;
|
22
28
|
}
|
23
29
|
});
|
30
|
+
Object.defineProperty(exports, "getRequestedCredentialToBePresented", {
|
31
|
+
enumerable: true,
|
32
|
+
get: function () {
|
33
|
+
return _completeUserAuthorization.getRequestedCredentialToBePresented;
|
34
|
+
}
|
35
|
+
});
|
24
36
|
Object.defineProperty(exports, "obtainCredential", {
|
25
37
|
enumerable: true,
|
26
38
|
get: function () {
|
27
39
|
return _obtainCredential.obtainCredential;
|
28
40
|
}
|
29
41
|
});
|
42
|
+
Object.defineProperty(exports, "parseAuthroizationResponse", {
|
43
|
+
enumerable: true,
|
44
|
+
get: function () {
|
45
|
+
return _completeUserAuthorization.parseAuthroizationResponse;
|
46
|
+
}
|
47
|
+
});
|
30
48
|
Object.defineProperty(exports, "startUserAuthorization", {
|
31
49
|
enumerable: true,
|
32
50
|
get: function () {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_evaluateIssuerTrust","require","_startUserAuthorization","_completeUserAuthorization","_authorizeAccess","_obtainCredential","_verifyAndParseCredential"],"sourceRoot":"../../../../src","sources":["credential/issuance/index.ts"],"mappings":"
|
1
|
+
{"version":3,"names":["_evaluateIssuerTrust","require","_startUserAuthorization","_completeUserAuthorization","_authorizeAccess","_obtainCredential","_verifyAndParseCredential"],"sourceRoot":"../../../../src","sources":["credential/issuance/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAAA,oBAAA,GAAAC,OAAA;AAIA,IAAAC,uBAAA,GAAAD,OAAA;AAIA,IAAAE,0BAAA,GAAAF,OAAA;AASA,IAAAG,gBAAA,GAAAH,OAAA;AACA,IAAAI,iBAAA,GAAAJ,OAAA;AAIA,IAAAK,yBAAA,GAAAL,OAAA"}
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.TokenResponse = exports.CredentialResponse = void 0;
|
6
|
+
exports.TokenResponse = exports.ResponseUriResultShape = exports.CredentialResponse = void 0;
|
7
7
|
var _par = require("../../utils/par");
|
8
8
|
var z = _interopRequireWildcard(require("zod"));
|
9
9
|
var _const = require("./const");
|
@@ -24,5 +24,13 @@ const CredentialResponse = z.object({
|
|
24
24
|
credential: z.string(),
|
25
25
|
format: _const.SupportedCredentialFormat
|
26
26
|
});
|
27
|
+
|
28
|
+
/**
|
29
|
+
* Shape from parsing a response given by a request uri during the EAA credential issuance flow with response mode "form_post.jwt".
|
30
|
+
*/
|
27
31
|
exports.CredentialResponse = CredentialResponse;
|
32
|
+
const ResponseUriResultShape = z.object({
|
33
|
+
redirect_uri: z.string()
|
34
|
+
});
|
35
|
+
exports.ResponseUriResultShape = ResponseUriResultShape;
|
28
36
|
//# sourceMappingURL=types.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_par","require","z","_interopRequireWildcard","_const","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","TokenResponse","object","access_token","string","authorization_details","array","AuthorizationDetail","c_nonce","c_nonce_expires_in","number","expires_in","token_type","exports","CredentialResponse","credential","format","SupportedCredentialFormat"],"sourceRoot":"../../../../src","sources":["credential/issuance/types.ts"],"mappings":";;;;;;AAAA,IAAAA,IAAA,GAAAC,OAAA;AACA,IAAAC,CAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAAoD,SAAAI,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAH,wBAAAO,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GA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CAAC4B,MAAM,CAAC,CAAC;EACtBY,MAAM,EAAEC;AACV,CAAC,CAAC;
|
1
|
+
{"version":3,"names":["_par","require","z","_interopRequireWildcard","_const","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","TokenResponse","object","access_token","string","authorization_details","array","AuthorizationDetail","c_nonce","c_nonce_expires_in","number","expires_in","token_type","exports","CredentialResponse","credential","format","SupportedCredentialFormat","ResponseUriResultShape","redirect_uri"],"sourceRoot":"../../../../src","sources":["credential/issuance/types.ts"],"mappings":";;;;;;AAAA,IAAAA,IAAA,GAAAC,OAAA;AACA,IAAAC,CAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAAoD,SAAAI,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAH,wBAAAO,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAA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C7CiB,YAAY,EAAE3C,CAAC,CAAC4B,MAAM,CAAC;AACzB,CAAC,CAAC;AAACS,OAAA,CAAAK,sBAAA,GAAAA,sBAAA"}
|
package/lib/commonjs/index.js
CHANGED
@@ -15,7 +15,7 @@ Object.defineProperty(exports, "AuthorizationDetails", {
|
|
15
15
|
return _par.AuthorizationDetails;
|
16
16
|
}
|
17
17
|
});
|
18
|
-
exports.WalletInstanceAttestation = exports.WalletInstance = exports.Trust = exports.SdJwt = exports.PID = exports.Errors = exports.Credential = void 0;
|
18
|
+
exports.WalletInstanceAttestation = exports.WalletInstance = exports.Trust = exports.SdJwt = exports.PID = exports.Errors = exports.Credential = exports.Cie = void 0;
|
19
19
|
Object.defineProperty(exports, "createCryptoContextFor", {
|
20
20
|
enumerable: true,
|
21
21
|
get: function () {
|
@@ -44,6 +44,8 @@ var Trust = _interopRequireWildcard(require("./trust"));
|
|
44
44
|
exports.Trust = Trust;
|
45
45
|
var WalletInstance = _interopRequireWildcard(require("./wallet-instance"));
|
46
46
|
exports.WalletInstance = WalletInstance;
|
47
|
+
var Cie = _interopRequireWildcard(require("./cie"));
|
48
|
+
exports.Cie = Cie;
|
47
49
|
var _par = require("./utils/par");
|
48
50
|
var _crypto = require("./utils/crypto");
|
49
51
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_jwk","require","Credential","_interopRequireWildcard","exports","PID","SdJwt","Errors","WalletInstanceAttestation","Trust","WalletInstance","_par","_crypto","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAAA,IAAA,GAAAC,OAAA;AAGAA,OAAA;AAEA,IAAAC,UAAA,GAAAC,uBAAA,CAAAF,OAAA;AAA2CG,OAAA,CAAAF,UAAA,GAAAA,UAAA;AAC3C,IAAAG,GAAA,GAAAF,uBAAA,CAAAF,OAAA;AAA6BG,OAAA,CAAAC,GAAA,GAAAA,GAAA;AAC7B,IAAAC,KAAA,GAAAH,uBAAA,CAAAF,OAAA;AAAkCG,OAAA,CAAAE,KAAA,GAAAA,KAAA;AAClC,IAAAC,MAAA,GAAAJ,uBAAA,CAAAF,OAAA;AAAyCG,OAAA,CAAAG,MAAA,GAAAA,MAAA;AACzC,IAAAC,yBAAA,GAAAL,uBAAA,CAAAF,OAAA;AAA2EG,OAAA,CAAAI,yBAAA,GAAAA,yBAAA;AAC3E,IAAAC,KAAA,GAAAN,uBAAA,CAAAF,OAAA;AAAiCG,OAAA,CAAAK,KAAA,GAAAA,KAAA;AACjC,IAAAC,cAAA,GAAAP,uBAAA,CAAAF,OAAA;AAAoDG,OAAA,CAAAM,cAAA,GAAAA,cAAA;AACpD,IAAAC,IAAA,
|
1
|
+
{"version":3,"names":["_jwk","require","Credential","_interopRequireWildcard","exports","PID","SdJwt","Errors","WalletInstanceAttestation","Trust","WalletInstance","Cie","_par","_crypto","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAAA,IAAA,GAAAC,OAAA;AAGAA,OAAA;AAEA,IAAAC,UAAA,GAAAC,uBAAA,CAAAF,OAAA;AAA2CG,OAAA,CAAAF,UAAA,GAAAA,UAAA;AAC3C,IAAAG,GAA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AAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAV,GAAA,EAAAW,GAAA,cAAAI,IAAA,KAAAA,IAAA,CAAAV,GAAA,IAAAU,IAAA,CAAAC,GAAA,KAAAR,MAAA,CAAAC,cAAA,CAAAH,MAAA,EAAAK,GAAA,EAAAI,IAAA,YAAAT,MAAA,CAAAK,GAAA,IAAAX,GAAA,CAAAW,GAAA,SAAAL,MAAA,CAAAJ,OAAA,GAAAF,GAAA,MAAAG,KAAA,IAAAA,KAAA,CAAAa,GAAA,CAAAhB,GAAA,EAAAM,MAAA,YAAAA,MAAA"}
|
@@ -48,8 +48,9 @@ const CredentialIssuerDisplayMetadata = z.object({
|
|
48
48
|
logo: z.object({
|
49
49
|
url: z.string(),
|
50
50
|
alt_text: z.string()
|
51
|
-
})
|
51
|
+
}).optional() // TODO [SIW-1268]: should not be optional
|
52
52
|
});
|
53
|
+
|
53
54
|
const ClaimsMetadata = z.record(z.object({
|
54
55
|
value_type: z.string(),
|
55
56
|
display: z.array(z.object({
|
@@ -64,7 +65,8 @@ const SupportedCredentialMetadata = z.object({
|
|
64
65
|
format: z.union([z.literal("vc+sd-jwt"), z.literal("vc+mdoc-cbor")]),
|
65
66
|
scope: z.string(),
|
66
67
|
display: z.array(CredentialDisplayMetadata),
|
67
|
-
claims: ClaimsMetadata,
|
68
|
+
claims: ClaimsMetadata.optional(),
|
69
|
+
// TODO [SIW-1268]: should not be optional
|
68
70
|
cryptographic_binding_methods_supported: z.array(z.string()),
|
69
71
|
credential_signing_alg_values_supported: z.array(z.string())
|
70
72
|
});
|
@@ -185,7 +187,7 @@ const CredentialIssuerEntityConfiguration = BaseEntityConfiguration.and(z.object
|
|
185
187
|
/** Credential Issuers act as Relying Party
|
186
188
|
when they require the presentation of other credentials.
|
187
189
|
This does not apply for PID issuance, which requires CIE authz. */
|
188
|
-
|
190
|
+
wallet_relying_party: RelyingPartyMetadata.optional()
|
189
191
|
})
|
190
192
|
})
|
191
193
|
}));
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_types","require","_jwk","z","_interopRequireWildcard","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","TrustMark","object","id","string","trust_mark","exports","RelyingPartyMetadata","application_type","optional","client_id","client_name","jwks","keys","array","JWK","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","UnixTime","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","openid_relying_party","RelyingPartyEntityConfiguration","wallet_relying_party","WalletProviderEntityConfiguration","wallet_provider","aal_values_supported","EntityConfiguration","description"],"sourceRoot":"../../../src","sources":["trust/types.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,IAAA,GAAAD,OAAA;AACA,IAAAE,CAAA,GAAAC,uBAAA,CAAAH,OAAA;AAAyB,SAAAI,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAF,wBAAAM,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAV,GAAA,EAAAW,GAAA,cAAAI,IAAA,KAAAA,IAAA,CAAAV,GAAA,IAAAU,IAAA,CAAAC,GAAA,KAAAR,MAAA,CAAAC,cAAA,CAAAH,MAAA,EAAAK,GAAA,EAAAI,IAAA,YAAAT,MAAA,CAAAK,GAAA,IAAAX,GAAA,CAAAW,GAAA,SAAAL,MAAA,CAAAJ,OAAA,GAAAF,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ACnG,OAAA,CAAAkG,mBAAA,GAAAA,mBAAA"}
|
1
|
+
{"version":3,"names":["_types","require","_jwk","z","_interopRequireWildcard","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","TrustMark","object","id","string","trust_mark","exports","RelyingPartyMetadata","application_type","optional","client_id","client_name","jwks","keys","array","JWK","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","UnixTime","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,IAAAA,MAAA,GAAA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errors = require("./errors");
|
|
10
10
|
* Decode a form_post.jwt and return the final JWT.
|
11
11
|
* The formData here is in form_post.jwt format as defined in
|
12
12
|
* JWT Secured Authorization Response Mode for OAuth 2.0 (JARM)
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
13
|
+
<!DOCTYPE html>
|
14
|
+
<html>
|
15
|
+
<head>
|
16
|
+
<meta charset="utf-8" />
|
17
|
+
</head>
|
18
|
+
<body onload="document.forms[0].submit()">
|
19
|
+
<noscript>
|
20
|
+
<p>
|
21
|
+
<strong>Note:</strong> Since your browser does not support JavaScript, you must press the Continue button once to proceed.
|
22
|
+
</p>
|
23
|
+
</noscript>
|
24
|
+
<form action="iowalletexample//cb" method="post">
|
25
|
+
<div>
|
26
|
+
<input type="hidden" name="response" value="somevalue" />
|
27
|
+
</div>
|
28
|
+
<noscript>
|
29
|
+
<div>
|
30
|
+
<input type="submit" value="Continue" />
|
31
|
+
</div>
|
32
|
+
</noscript>
|
33
|
+
</form>
|
34
|
+
</body>
|
35
|
+
</html>
|
27
36
|
*/
|
28
37
|
const getJwtFromFormPost = async formData => {
|
29
|
-
const formPostRegex = /<input
|
38
|
+
const formPostRegex = /<input[^>]*name="response"[^>]*value="([^"]*)"/i;
|
30
39
|
const lineExpressionRegex = /\r\n|\n\r|\n|\r|\s+/g;
|
31
|
-
const
|
32
|
-
if (
|
33
|
-
const responseJwt =
|
40
|
+
const match = formPostRegex.exec(formData);
|
41
|
+
if (match && match[1]) {
|
42
|
+
const responseJwt = match[1];
|
34
43
|
if (responseJwt) {
|
35
44
|
const jwt = responseJwt.replace(lineExpressionRegex, "");
|
36
|
-
const decodedJwt =
|
45
|
+
const decodedJwt = (0, _ioReactNativeJwt.decode)(jwt);
|
37
46
|
return {
|
38
47
|
jwt,
|
39
48
|
decodedJwt
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_ioReactNativeJwt","require","_errors","getJwtFromFormPost","formData","formPostRegex","lineExpressionRegex","
|
1
|
+
{"version":3,"names":["_ioReactNativeJwt","require","_errors","getJwtFromFormPost","formData","formPostRegex","lineExpressionRegex","match","exec","responseJwt","jwt","replace","decodedJwt","decodeJwt","ValidationFailed","exports"],"sourceRoot":"../../../src","sources":["utils/decoder.ts"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AAEA,IAAAC,OAAA,GAAAD,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAME,kBAAkB,GAAG,MAChCC,QAAgB,IAC0C;EAC1D,MAAMC,aAAa,GAAG,iDAAiD;EACvE,MAAMC,mBAAmB,GAAG,sBAAsB;EAElD,MAAMC,KAAK,GAAGF,aAAa,CAACG,IAAI,CAACJ,QAAQ,CAAC;EAC1C,IAAIG,KAAK,IAAIA,KAAK,CAAC,CAAC,CAAC,EAAE;IACrB,MAAME,WAAW,GAAGF,KAAK,CAAC,CAAC,CAAC;IAE5B,IAAIE,WAAW,EAAE;MACf,MAAMC,GAAG,GAAGD,WAAW,CAACE,OAAO,CAACL,mBAAmB,EAAE,EAAE,CAAC;MACxD,MAAMM,UAAU,GAAG,IAAAC,wBAAS,EAACH,GAAG,CAAC;MACjC,OAAO;QAAEA,GAAG;QAAEE;MAAW,CAAC;IAC5B;EACF;EAEA,MAAM,IAAIE,wBAAgB,CACvB,uDAAsDV,QAAS,EAClE,CAAC;AACH,CAAC;AAACW,OAAA,CAAAZ,kBAAA,GAAAA,kBAAA"}
|
@@ -0,0 +1,171 @@
|
|
1
|
+
import React, { createRef } from "react";
|
2
|
+
import { Platform } from "react-native";
|
3
|
+
import { WebView } from "react-native-webview";
|
4
|
+
import { startCieAndroid, startCieiOS } from "./manager";
|
5
|
+
import { CieError, CieErrorType } from "./error";
|
6
|
+
|
7
|
+
/* To obtain the authentication URL on CIE L3 it is necessary to take the
|
8
|
+
* link contained in the "Entra con lettura carta CIE" button.
|
9
|
+
* This link can then be used on CieManager.
|
10
|
+
* This javascript code takes the link in question and sends it to the react native function via postMessage
|
11
|
+
*/
|
12
|
+
const injectedJavaScript = `
|
13
|
+
(function() {
|
14
|
+
function sendDocumentContent() {
|
15
|
+
const idpAuthUrl = [...document.querySelectorAll("a")]
|
16
|
+
.filter(a => a.textContent.includes("lettura carta CIE"))
|
17
|
+
.map(a=>a.href)[0];
|
18
|
+
|
19
|
+
if(idpAuthUrl) {
|
20
|
+
window.ReactNativeWebView.postMessage(idpAuthUrl);
|
21
|
+
}
|
22
|
+
}
|
23
|
+
if (document.readyState === 'complete') {
|
24
|
+
sendDocumentContent();
|
25
|
+
} else {
|
26
|
+
window.addEventListener('load', sendDocumentContent);
|
27
|
+
}
|
28
|
+
})();
|
29
|
+
true;
|
30
|
+
`;
|
31
|
+
export let CieEvent = /*#__PURE__*/function (CieEvent) {
|
32
|
+
CieEvent["reading"] = "reading";
|
33
|
+
CieEvent["completed"] = "completed";
|
34
|
+
CieEvent["waiting_card"] = "waiting_card";
|
35
|
+
return CieEvent;
|
36
|
+
}({});
|
37
|
+
/*
|
38
|
+
* To make sure the server recognizes the client as valid iPhone device (iOS only) we use a custom header
|
39
|
+
* on Android it is not required.
|
40
|
+
*/
|
41
|
+
const iOSUserAgent = "Mozilla/5.0 (iPhone; CPU iPhone OS 14_0_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Mobile/15E148 Safari/604.1";
|
42
|
+
const defaultUserAgent = Platform.select({
|
43
|
+
ios: iOSUserAgent,
|
44
|
+
default: undefined
|
45
|
+
});
|
46
|
+
const webView = /*#__PURE__*/createRef();
|
47
|
+
|
48
|
+
/**
|
49
|
+
* WebViewComponent
|
50
|
+
*
|
51
|
+
* Component that manages authentication via CIE L3 (NFC+PIN) based on WebView (react-native-webview).
|
52
|
+
* In particular, once rendered, it makes a series of calls to the authUrl in the WebView,
|
53
|
+
* extrapolates the authentication URL necessary for CieManager to sign via certificate
|
54
|
+
* and calls the CIE SDK which is responsible for starting card reading via NFC.
|
55
|
+
* At the end of the reading, a redirect is made in the WebView towards the page that asks
|
56
|
+
* the user for consent to send the data to the Service Provider. This moment can be captured
|
57
|
+
* via the onUserInteraction parameter. When the user allows or denies their consent,
|
58
|
+
* a redirect is made to the URL set by the Service Provider.
|
59
|
+
* This url can be configured using the redirectUrl parameter which allows you to close the WebView.
|
60
|
+
* The event can then be captured via the onSuccess parameter.
|
61
|
+
*
|
62
|
+
* @param {CIEParams} params - Parameters required by the component.
|
63
|
+
* @param {string} params.authUrl -The authentication URL of the Service Provider to which to authenticate.
|
64
|
+
* @param {boolean} params.useUat - If set to true it uses the CIE testing environment.
|
65
|
+
* @param {string} params.pin - CIE pin for use with NFC reading.
|
66
|
+
* @param {Function} params.onError - Callback function in case of error. The function is passed the Error parameter.
|
67
|
+
* @param {Function} params.onSuccess - Callback at the end of authentication to which the redirect URL including parameters is passed.
|
68
|
+
* @param {string} params.redirectUrl - Redirect URL set by the Service Provider. It is used to stop the flow and return to the calling function via onSuccess.
|
69
|
+
* @param {Function} params.onEvent - Callback function that is called whenever there is a new CieEvent from the CIE reader.
|
70
|
+
* @returns {JSX.Element} - The configured component with WebView.
|
71
|
+
*/
|
72
|
+
export const WebViewComponent = params => {
|
73
|
+
const [webViewUrl, setWebViewUrl] = React.useState(params.authUrl);
|
74
|
+
const [isCardReadingFinished, setCardReadingFinished] = React.useState(false);
|
75
|
+
|
76
|
+
/*
|
77
|
+
* Once the reading of the card with NFC is finished, it is necessary
|
78
|
+
* to change the URL of the WebView by redirecting to the URL returned by
|
79
|
+
* CieManager to allow the user to continue with the consent authorization
|
80
|
+
* */
|
81
|
+
const continueWithUrl = callbackUrl => {
|
82
|
+
setCardReadingFinished(true);
|
83
|
+
setWebViewUrl(callbackUrl);
|
84
|
+
};
|
85
|
+
|
86
|
+
// This function is called from the injected javascript code (postMessage). Which receives the authentication URL
|
87
|
+
const handleMessage = async event => {
|
88
|
+
const cieAuthorizationUri = event.nativeEvent.data;
|
89
|
+
const startCie = Platform.select({
|
90
|
+
ios: startCieiOS,
|
91
|
+
default: startCieAndroid
|
92
|
+
});
|
93
|
+
await startCie(params.useUat, params.pin, params.onError, params.onEvent, cieAuthorizationUri, continueWithUrl);
|
94
|
+
};
|
95
|
+
|
96
|
+
//This function is called when authentication with CIE ends and the SP URL containing code and state is returned
|
97
|
+
const handleShouldStartLoading = (onSuccess, redirectUrl) => event => {
|
98
|
+
if (isCardReadingFinished && event.url.includes(redirectUrl)) {
|
99
|
+
onSuccess(event.url);
|
100
|
+
return false;
|
101
|
+
} else {
|
102
|
+
return true;
|
103
|
+
}
|
104
|
+
};
|
105
|
+
const handleOnLoadEnd = (onError, onCieEvent) => e => {
|
106
|
+
const eventTitle = e.nativeEvent.title.toLowerCase();
|
107
|
+
if (eventTitle === "pagina web non disponibile" ||
|
108
|
+
// On Android, if we attempt to access the idp URL twice,
|
109
|
+
// we are presented with an error page titled "ERROR".
|
110
|
+
eventTitle === "errore") {
|
111
|
+
handleOnError(onError)(new Error(eventTitle));
|
112
|
+
}
|
113
|
+
|
114
|
+
/* At the end of loading the page, if the card has already been read
|
115
|
+
* then the WebView has loaded the page to ask the user for consent,
|
116
|
+
* so send the completed event
|
117
|
+
* */
|
118
|
+
if (isCardReadingFinished) {
|
119
|
+
onCieEvent(CieEvent.completed);
|
120
|
+
}
|
121
|
+
};
|
122
|
+
const handleOnError = onError => e => {
|
123
|
+
const error = e;
|
124
|
+
const webViewError = e;
|
125
|
+
const webViewHttpError = e;
|
126
|
+
if (webViewHttpError.nativeEvent.statusCode) {
|
127
|
+
const {
|
128
|
+
description,
|
129
|
+
statusCode
|
130
|
+
} = webViewHttpError.nativeEvent;
|
131
|
+
onError(new CieError({
|
132
|
+
message: `WebView http error: ${description} with status code: ${statusCode}`,
|
133
|
+
type: CieErrorType.WEB_VIEW_ERROR
|
134
|
+
}));
|
135
|
+
} else if (webViewError.nativeEvent) {
|
136
|
+
const {
|
137
|
+
code,
|
138
|
+
description
|
139
|
+
} = webViewError.nativeEvent;
|
140
|
+
onError(new CieError({
|
141
|
+
message: `WebView error: ${description} with code: ${code}`,
|
142
|
+
type: CieErrorType.WEB_VIEW_ERROR
|
143
|
+
}));
|
144
|
+
} else if (error.message !== undefined) {
|
145
|
+
onError(new CieError({
|
146
|
+
message: `${error.message}`,
|
147
|
+
type: CieErrorType.WEB_VIEW_ERROR
|
148
|
+
}));
|
149
|
+
} else {
|
150
|
+
onError(new CieError({
|
151
|
+
message: "An error occurred in the WebView",
|
152
|
+
type: CieErrorType.WEB_VIEW_ERROR
|
153
|
+
}));
|
154
|
+
}
|
155
|
+
};
|
156
|
+
return /*#__PURE__*/React.createElement(WebView, {
|
157
|
+
ref: webView,
|
158
|
+
userAgent: defaultUserAgent,
|
159
|
+
javaScriptEnabled: true,
|
160
|
+
source: {
|
161
|
+
uri: webViewUrl
|
162
|
+
},
|
163
|
+
onLoadEnd: handleOnLoadEnd(params.onError, params.onEvent),
|
164
|
+
onError: handleOnError(params.onError),
|
165
|
+
onHttpError: handleOnError(params.onError),
|
166
|
+
injectedJavaScript: injectedJavaScript,
|
167
|
+
onShouldStartLoadWithRequest: handleShouldStartLoading(params.onSuccess, params.redirectUrl),
|
168
|
+
onMessage: handleMessage
|
169
|
+
});
|
170
|
+
};
|
171
|
+
//# sourceMappingURL=component.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["React","createRef","Platform","WebView","startCieAndroid","startCieiOS","CieError","CieErrorType","injectedJavaScript","CieEvent","iOSUserAgent","defaultUserAgent","select","ios","default","undefined","webView","WebViewComponent","params","webViewUrl","setWebViewUrl","useState","authUrl","isCardReadingFinished","setCardReadingFinished","continueWithUrl","callbackUrl","handleMessage","event","cieAuthorizationUri","nativeEvent","data","startCie","useUat","pin","onError","onEvent","handleShouldStartLoading","onSuccess","redirectUrl","url","includes","handleOnLoadEnd","onCieEvent","e","eventTitle","title","toLowerCase","handleOnError","Error","completed","error","webViewError","webViewHttpError","statusCode","description","message","type","WEB_VIEW_ERROR","code","createElement","ref","userAgent","javaScriptEnabled","source","uri","onLoadEnd","onHttpError","onShouldStartLoadWithRequest","onMessage"],"sourceRoot":"../../../src","sources":["cie/component.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SAASC,QAAQ,QAAQ,cAAc;AACvC,SAASC,OAAO,QAAQ,sBAAsB;AAS9C,SAASC,eAAe,EAAEC,WAAW,QAA8B,WAAW;AAC9E,SAASC,QAAQ,EAAEC,YAAY,QAAQ,SAAS;;AAEhD;AACA;AACA;AACA;AACA;AACA,MAAMC,kBAAkB,GAAI;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AAIH,WAAYC,QAAQ,0BAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAAA,OAARA,QAAQ;AAAA;AAgBpB;AACA;AACA;AACA;AACA,MAAMC,YAAY,GAChB,2IAA2I;AAC7I,MAAMC,gBAAgB,GAAGT,QAAQ,CAACU,MAAM,CAAC;EACvCC,GAAG,EAAEH,YAAY;EACjBI,OAAO,EAAEC;AACX,CAAC,CAAC;AAEF,MAAMC,OAAO,gBAAGf,SAAS,CAAU,CAAC;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMgB,gBAAgB,GAAIC,MAAiB,IAAK;EACrD,MAAM,CAACC,UAAU,EAAEC,aAAa,CAAC,GAAGpB,KAAK,CAACqB,QAAQ,CAACH,MAAM,CAACI,OAAO,CAAC;EAClE,MAAM,C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O;IACN0D,GAAG,EAAE7C,OAAQ;IACb8C,SAAS,EAAEnD,gBAAiB;IAC5BoD,iBAAiB,EAAE,IAAK;IACxBC,MAAM,EAAE;MAAEC,GAAG,EAAE9C;IAAW,CAAE;IAC5B+C,SAAS,EAAExB,eAAe,CAACxB,MAAM,CAACiB,OAAO,EAAEjB,MAAM,CAACkB,OAAO,CAAE;IAC3DD,OAAO,EAAEa,aAAa,CAAC9B,MAAM,CAACiB,OAAO,CAAE;IACvCgC,WAAW,EAAEnB,aAAa,CAAC9B,MAAM,CAACiB,OAAO,CAAE;IAC3C3B,kBAAkB,EAAEA,kBAAmB;IACvC4D,4BAA4B,EAAE/B,wBAAwB,CACpDnB,MAAM,CAACoB,SAAS,EAChBpB,MAAM,CAACqB,WACT,CAAE;IACF8B,SAAS,EAAE1C;EAAc,CAC1B,CAAC;AAEN,CAAC"}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
export let CieErrorType = /*#__PURE__*/function (CieErrorType) {
|
2
|
+
CieErrorType[CieErrorType["GENERIC"] = 0] = "GENERIC";
|
3
|
+
CieErrorType[CieErrorType["TAG_NOT_VALID"] = 1] = "TAG_NOT_VALID";
|
4
|
+
CieErrorType[CieErrorType["WEB_VIEW_ERROR"] = 2] = "WEB_VIEW_ERROR";
|
5
|
+
CieErrorType[CieErrorType["NFC_ERROR"] = 3] = "NFC_ERROR";
|
6
|
+
CieErrorType[CieErrorType["AUTHENTICATION_ERROR"] = 4] = "AUTHENTICATION_ERROR";
|
7
|
+
CieErrorType[CieErrorType["PIN_ERROR"] = 5] = "PIN_ERROR";
|
8
|
+
CieErrorType[CieErrorType["PIN_LOCKED"] = 6] = "PIN_LOCKED";
|
9
|
+
CieErrorType[CieErrorType["CERTIFICATE_ERROR"] = 7] = "CERTIFICATE_ERROR";
|
10
|
+
return CieErrorType;
|
11
|
+
}({});
|
12
|
+
export class CieError extends Error {
|
13
|
+
constructor(options) {
|
14
|
+
super(options.message);
|
15
|
+
if (options.type) {
|
16
|
+
this.type = options.type;
|
17
|
+
} else {
|
18
|
+
this.type = CieErrorType.GENERIC;
|
19
|
+
}
|
20
|
+
if (this.type === CieErrorType.PIN_ERROR) {
|
21
|
+
this.attemptsLeft = options.attemptsLeft;
|
22
|
+
} else if (this.type === CieErrorType.PIN_LOCKED) {
|
23
|
+
this.attemptsLeft = 0;
|
24
|
+
}
|
25
|
+
this.name = this.constructor.name;
|
26
|
+
}
|
27
|
+
toString() {
|
28
|
+
return JSON.stringify({
|
29
|
+
name: this.name,
|
30
|
+
type: CieErrorType[this.type],
|
31
|
+
message: this.message,
|
32
|
+
attemptsLeft: this.attemptsLeft
|
33
|
+
});
|
34
|
+
}
|
35
|
+
}
|
36
|
+
//# sourceMappingURL=error.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["CieErrorType","CieError","Error","constructor","options","message","type","GENERIC","PIN_ERROR","attemptsLeft","PIN_LOCKED","name","toString","JSON","stringify"],"sourceRoot":"../../../src","sources":["cie/error.ts"],"mappings":"AAAA,WAAYA,YAAY,0BAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAA,OAAZA,YAAY;AAAA;AA4BxB,OAAO,MAAMC,QAAQ,SAASC,KAAK,CAAC;EAGlCC,WAAWA,CAACC,OAAqB,EAAE;IACjC,KAAK,CAACA,OAAO,CAACC,OAAO,CAAC;IAEtB,IAAID,OAAO,CAACE,IAAI,EAAE;MAChB,IAAI,CAACA,IAAI,GAAGF,OAAO,CAACE,IAAI;IAC1B,CAAC,MAAM;MACL,IAAI,CAACA,IAAI,GAAGN,YAAY,CAACO,OAAO;IAClC;IAEA,IAAI,IAAI,CAACD,IAAI,KAAKN,YAAY,CAACQ,SAAS,EAAE;MACxC,IAAI,CAACC,YAAY,GAAGL,OAAO,CAACK,YAAY;IAC1C,CAAC,MAAM,IAAI,IAAI,CAACH,IAAI,KAAKN,YAAY,CAACU,UAAU,EAAE;MAChD,IAAI,CAACD,YAAY,GAAG,CAAC;IACvB;IAEA,IAAI,CAACE,IAAI,GAAG,IAAI,CAACR,WAAW,CAACQ,IAAI;EACnC;EAEAC,QAAQA,CAAA,EAAW;IACjB,OAAOC,IAAI,CAACC,SAAS,CAAC;MACpBH,IAAI,EAAE,IAAI,CAACA,IAAI;MACfL,IAAI,EAAEN,YAAY,CAAC,IAAI,CAACM,IAAI,CAAC;MAC7BD,OAAO,EAAE,IAAI,CAACA,OAAO;MACrBI,YAAY,EAAE,IAAI,CAACA;IACrB,CAAC,CAAC;EACJ;AACF"}
|