@pagopa/io-react-native-wallet 3.4.2 → 3.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/credential/issuance/api/IssuerConfig.js +6 -0
- package/lib/commonjs/credential/issuance/api/IssuerConfig.js.map +1 -1
- package/lib/commonjs/credential/issuance/v1.3.3/01-evaluate-issuer-trust.js +1 -0
- package/lib/commonjs/credential/issuance/v1.3.3/01-evaluate-issuer-trust.js.map +1 -1
- package/lib/commonjs/credential/issuance/v1.3.3/02-start-user-authorization.js +8 -1
- package/lib/commonjs/credential/issuance/v1.3.3/02-start-user-authorization.js.map +1 -1
- package/lib/commonjs/credential/issuance/v1.3.3/mappers.js +14 -6
- package/lib/commonjs/credential/issuance/v1.3.3/mappers.js.map +1 -1
- package/lib/commonjs/credential/offer/api/03-validate-credential-offer.js +6 -0
- package/lib/commonjs/credential/offer/api/03-validate-credential-offer.js.map +1 -0
- package/lib/commonjs/credential/offer/api/index.js.map +1 -1
- package/lib/commonjs/credential/offer/v1.0.0/index.js +3 -0
- package/lib/commonjs/credential/offer/v1.0.0/index.js.map +1 -1
- package/lib/commonjs/credential/offer/v1.3.3/01-resolve-credential-offer.js +7 -21
- package/lib/commonjs/credential/offer/v1.3.3/01-resolve-credential-offer.js.map +1 -1
- package/lib/commonjs/credential/offer/v1.3.3/02-extract-grant-details.js +5 -1
- package/lib/commonjs/credential/offer/v1.3.3/02-extract-grant-details.js.map +1 -1
- package/lib/commonjs/credential/offer/v1.3.3/03-validate-credential-offer.js +39 -0
- package/lib/commonjs/credential/offer/v1.3.3/03-validate-credential-offer.js.map +1 -0
- package/lib/commonjs/credential/offer/v1.3.3/index.js +3 -1
- package/lib/commonjs/credential/offer/v1.3.3/index.js.map +1 -1
- package/lib/module/credential/issuance/api/IssuerConfig.js +6 -0
- package/lib/module/credential/issuance/api/IssuerConfig.js.map +1 -1
- package/lib/module/credential/issuance/v1.3.3/01-evaluate-issuer-trust.js +1 -0
- package/lib/module/credential/issuance/v1.3.3/01-evaluate-issuer-trust.js.map +1 -1
- package/lib/module/credential/issuance/v1.3.3/02-start-user-authorization.js +8 -1
- package/lib/module/credential/issuance/v1.3.3/02-start-user-authorization.js.map +1 -1
- package/lib/module/credential/issuance/v1.3.3/mappers.js +14 -6
- package/lib/module/credential/issuance/v1.3.3/mappers.js.map +1 -1
- package/lib/module/credential/offer/api/03-validate-credential-offer.js +2 -0
- package/lib/module/credential/offer/api/03-validate-credential-offer.js.map +1 -0
- package/lib/module/credential/offer/api/index.js.map +1 -1
- package/lib/module/credential/offer/v1.0.0/index.js +3 -0
- package/lib/module/credential/offer/v1.0.0/index.js.map +1 -1
- package/lib/module/credential/offer/v1.3.3/01-resolve-credential-offer.js +10 -23
- package/lib/module/credential/offer/v1.3.3/01-resolve-credential-offer.js.map +1 -1
- package/lib/module/credential/offer/v1.3.3/02-extract-grant-details.js +6 -1
- package/lib/module/credential/offer/v1.3.3/02-extract-grant-details.js.map +1 -1
- package/lib/module/credential/offer/v1.3.3/03-validate-credential-offer.js +33 -0
- package/lib/module/credential/offer/v1.3.3/03-validate-credential-offer.js.map +1 -0
- package/lib/module/credential/offer/v1.3.3/index.js +3 -1
- package/lib/module/credential/offer/v1.3.3/index.js.map +1 -1
- package/lib/typescript/credential/issuance/api/01-evaluate-issuer-trust.d.ts +4 -0
- package/lib/typescript/credential/issuance/api/01-evaluate-issuer-trust.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/api/02-start-user-authorization.d.ts +4 -0
- package/lib/typescript/credential/issuance/api/02-start-user-authorization.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/api/IssuerConfig.d.ts +1 -0
- package/lib/typescript/credential/issuance/api/IssuerConfig.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/v1.0.0/mappers.d.ts +1 -0
- package/lib/typescript/credential/issuance/v1.0.0/mappers.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/v1.3.3/01-evaluate-issuer-trust.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/v1.3.3/02-start-user-authorization.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/v1.3.3/mappers.d.ts +490 -4
- package/lib/typescript/credential/issuance/v1.3.3/mappers.d.ts.map +1 -1
- package/lib/typescript/credential/offer/api/02-extract-grant-details.d.ts +1 -1
- package/lib/typescript/credential/offer/api/03-validate-credential-offer.d.ts +19 -0
- package/lib/typescript/credential/offer/api/03-validate-credential-offer.d.ts.map +1 -0
- package/lib/typescript/credential/offer/api/index.d.ts +2 -1
- package/lib/typescript/credential/offer/api/index.d.ts.map +1 -1
- package/lib/typescript/credential/offer/v1.0.0/index.d.ts.map +1 -1
- package/lib/typescript/credential/offer/v1.3.3/01-resolve-credential-offer.d.ts +5 -11
- package/lib/typescript/credential/offer/v1.3.3/01-resolve-credential-offer.d.ts.map +1 -1
- package/lib/typescript/credential/offer/v1.3.3/02-extract-grant-details.d.ts.map +1 -1
- package/lib/typescript/credential/offer/v1.3.3/03-validate-credential-offer.d.ts +15 -0
- package/lib/typescript/credential/offer/v1.3.3/03-validate-credential-offer.d.ts.map +1 -0
- package/lib/typescript/credential/offer/v1.3.3/index.d.ts.map +1 -1
- package/lib/typescript/trust/v1.3.3/types.d.ts +2 -2
- package/package.json +6 -6
- package/src/credential/issuance/api/01-evaluate-issuer-trust.ts +4 -1
- package/src/credential/issuance/api/02-start-user-authorization.ts +4 -0
- package/src/credential/issuance/api/IssuerConfig.ts +6 -0
- package/src/credential/issuance/v1.3.3/01-evaluate-issuer-trust.ts +1 -0
- package/src/credential/issuance/v1.3.3/02-start-user-authorization.ts +7 -0
- package/src/credential/issuance/v1.3.3/mappers.ts +15 -5
- package/src/credential/offer/api/02-extract-grant-details.ts +1 -1
- package/src/credential/offer/api/03-validate-credential-offer.ts +19 -0
- package/src/credential/offer/api/index.ts +3 -1
- package/src/credential/offer/v1.0.0/index.ts +3 -0
- package/src/credential/offer/v1.3.3/01-resolve-credential-offer.ts +8 -26
- package/src/credential/offer/v1.3.3/02-extract-grant-details.ts +6 -1
- package/src/credential/offer/v1.3.3/03-validate-credential-offer.ts +33 -0
- package/src/credential/offer/v1.3.3/index.ts +2 -0
|
@@ -1,26 +1,22 @@
|
|
|
1
|
-
import { resolveCredentialOffer as sdkResolveCredentialOffer,
|
|
2
|
-
import { InvalidQRCodeError
|
|
1
|
+
import { resolveCredentialOffer as sdkResolveCredentialOffer, CredentialOfferError } from "@pagopa/io-wallet-oid4vci";
|
|
2
|
+
import { InvalidQRCodeError } from "../common/errors";
|
|
3
|
+
import { sdkConfigV1_3 } from "../../../utils/config";
|
|
4
|
+
|
|
3
5
|
/**
|
|
4
6
|
* v1.3.3 implementation — first step of the User Request Flow
|
|
5
7
|
* (IT-Wallet spec, Section 12.1.2).
|
|
6
8
|
*
|
|
7
9
|
* Delegates to the SDK's {@link sdkResolveCredentialOffer} for URI parsing
|
|
8
|
-
* and by-reference fetching
|
|
9
|
-
* IT-Wallet v1.3 structural checks:
|
|
10
|
-
* - `credential_issuer` must be an HTTPS URL
|
|
11
|
-
* - `grants` object is required
|
|
12
|
-
* - `authorization_code` grant is required
|
|
13
|
-
* - `scope` is required within `authorization_code`
|
|
10
|
+
* and by-reference fetching of the Credential Offer.
|
|
14
11
|
*
|
|
15
12
|
* Supported URI schemes: `openid-credential-offer://`, `haip-vci://`, `https://`.
|
|
16
13
|
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
14
|
+
* Structural validation and cross-validation against the Credential Issuer
|
|
15
|
+
* metadata are **not** performed here; they belong to the dedicated
|
|
16
|
+
* validate-credential-offer step of the flow.
|
|
20
17
|
*
|
|
21
18
|
* Resolution errors (bad scheme, missing params, network failure) are mapped
|
|
22
|
-
* to {@link InvalidQRCodeError}
|
|
23
|
-
* {@link InvalidCredentialOfferError}.
|
|
19
|
+
* to {@link InvalidQRCodeError}.
|
|
24
20
|
*/
|
|
25
21
|
export const resolveCredentialOffer = async function (credentialOffer) {
|
|
26
22
|
let callbacks = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
@@ -30,6 +26,7 @@ export const resolveCredentialOffer = async function (credentialOffer) {
|
|
|
30
26
|
|
|
31
27
|
// Parse the URI and fetch the offer when transmitted by reference
|
|
32
28
|
const resolved = await sdkResolveCredentialOffer({
|
|
29
|
+
config: sdkConfigV1_3,
|
|
33
30
|
credentialOffer,
|
|
34
31
|
callbacks: {
|
|
35
32
|
fetch: fetchFn
|
|
@@ -40,16 +37,6 @@ export const resolveCredentialOffer = async function (credentialOffer) {
|
|
|
40
37
|
}
|
|
41
38
|
throw e;
|
|
42
39
|
});
|
|
43
|
-
|
|
44
|
-
// Structural validation (no metadata cross-checks at this stage)
|
|
45
|
-
await validateCredentialOffer({
|
|
46
|
-
credentialOffer: resolved
|
|
47
|
-
}).catch(e => {
|
|
48
|
-
if (e instanceof CredentialOfferError) {
|
|
49
|
-
throw new InvalidCredentialOfferError(e.message);
|
|
50
|
-
}
|
|
51
|
-
throw e;
|
|
52
|
-
});
|
|
53
40
|
return resolved;
|
|
54
41
|
};
|
|
55
42
|
//# sourceMappingURL=01-resolve-credential-offer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["resolveCredentialOffer","sdkResolveCredentialOffer","
|
|
1
|
+
{"version":3,"names":["resolveCredentialOffer","sdkResolveCredentialOffer","CredentialOfferError","InvalidQRCodeError","sdkConfigV1_3","credentialOffer","callbacks","arguments","length","undefined","fetch","fetchFn","resolved","config","catch","e","message"],"sourceRoot":"../../../../../src","sources":["credential/offer/v1.3.3/01-resolve-credential-offer.ts"],"mappings":"AAAA,SACEA,sBAAsB,IAAIC,yBAAyB,EACnDC,oBAAoB,QACf,2BAA2B;AAClC,SAASC,kBAAkB,QAAQ,kBAAkB;AAErD,SAASC,aAAa,QAAQ,uBAAuB;;AAErD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMJ,sBAA0D,GACrE,eAAAA,CAAOK,eAAe,EAAqB;EAAA,IAAnBC,SAAS,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EACpC,MAAM;IAAEG,KAAK,EAAEC,OAAO,GAAGD;EAAM,CAAC,GAAGJ,SAAS;;EAE5C;EACA,MAAMM,QAAQ,GAAG,MAAMX,yBAAyB,CAAC;IAC/CY,MAAM,EAAET,aAAa;IACrBC,eAAe;IACfC,SAAS,EAAE;MAAEI,KAAK,EAAEC;IAAQ;EAC9B,CAAC,CAAC,CAACG,KAAK,CAAEC,CAAU,IAAK;IACvB,IAAIA,CAAC,YAAYb,oBAAoB,EAAE;MACrC,MAAM,IAAIC,kBAAkB,CAACY,CAAC,CAACC,OAAO,CAAC;IACzC;IACA,MAAMD,CAAC;EACT,CAAC,CAAC;EAEF,OAAOH,QAAQ;AACjB,CAAC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { extractGrantDetails as sdkExtractGrantDetails, CredentialOfferError } from "@pagopa/io-wallet-oid4vci";
|
|
2
2
|
import { InvalidCredentialOfferError } from "../common/errors";
|
|
3
3
|
import { withMappedErrors } from "../../../utils/errors";
|
|
4
|
+
import { sdkConfigV1_3 } from "../../../utils/config";
|
|
5
|
+
|
|
4
6
|
/**
|
|
5
7
|
* v1.3.3 implementation — second and final step of the User Request Flow
|
|
6
8
|
* (IT-Wallet spec, Section 12.1.2).
|
|
@@ -14,5 +16,8 @@ import { withMappedErrors } from "../../../utils/errors";
|
|
|
14
16
|
* Delegates directly to the SDK's {@link sdkExtractGrantDetails} — no local
|
|
15
17
|
* mapping is needed because the SDK already returns `ExtractGrantDetailsResult`.
|
|
16
18
|
*/
|
|
17
|
-
export const extractGrantDetails = offer => withMappedErrors(() => sdkExtractGrantDetails(
|
|
19
|
+
export const extractGrantDetails = offer => withMappedErrors(() => sdkExtractGrantDetails({
|
|
20
|
+
config: sdkConfigV1_3,
|
|
21
|
+
credentialOffer: offer
|
|
22
|
+
}), CredentialOfferError, e => new InvalidCredentialOfferError(e.message));
|
|
18
23
|
//# sourceMappingURL=02-extract-grant-details.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["extractGrantDetails","sdkExtractGrantDetails","CredentialOfferError","InvalidCredentialOfferError","withMappedErrors","offer","e","message"],"sourceRoot":"../../../../../src","sources":["credential/offer/v1.3.3/02-extract-grant-details.ts"],"mappings":"AAAA,SACEA,mBAAmB,IAAIC,sBAAsB,EAC7CC,oBAAoB,QACf,2BAA2B;AAClC,SAASC,2BAA2B,QAAQ,kBAAkB;AAC9D,SAASC,gBAAgB,QAAQ,uBAAuB;
|
|
1
|
+
{"version":3,"names":["extractGrantDetails","sdkExtractGrantDetails","CredentialOfferError","InvalidCredentialOfferError","withMappedErrors","sdkConfigV1_3","offer","config","credentialOffer","e","message"],"sourceRoot":"../../../../../src","sources":["credential/offer/v1.3.3/02-extract-grant-details.ts"],"mappings":"AAAA,SACEA,mBAAmB,IAAIC,sBAAsB,EAC7CC,oBAAoB,QACf,2BAA2B;AAClC,SAASC,2BAA2B,QAAQ,kBAAkB;AAC9D,SAASC,gBAAgB,QAAQ,uBAAuB;AAExD,SAASC,aAAa,QAAQ,uBAAuB;;AAErD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAML,mBAAoD,GAAIM,KAAK,IACxEF,gBAAgB,CACd,MACEH,sBAAsB,CAAC;EACrBM,MAAM,EAAEF,aAAa;EACrBG,eAAe,EAAEF;AACnB,CAAC,CAAC,EACJJ,oBAAoB,EACnBO,CAAC,IAAK,IAAIN,2BAA2B,CAACM,CAAC,CAACC,OAAO,CAClD,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { validateCredentialOffer as sdkValidateCredentialOffer, CredentialOfferError } from "@pagopa/io-wallet-oid4vci";
|
|
2
|
+
import { InvalidCredentialOfferError } from "../common/errors";
|
|
3
|
+
import { sdkConfigV1_3 } from "../../../utils/config";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* v1.3.3 implementation — validates a resolved Credential Offer against the
|
|
7
|
+
* Credential Issuer metadata (IT-Wallet spec, Section 12.1.2).
|
|
8
|
+
*
|
|
9
|
+
* Performs the IT-Wallet v1.3 structural checks on the offer and, when the
|
|
10
|
+
* Credential Issuer relies on multiple Authorization Servers, ensures the
|
|
11
|
+
* `authorization_server` selected by the offer matches one of the advertised
|
|
12
|
+
* `authorization_servers`.
|
|
13
|
+
*
|
|
14
|
+
* Delegates to the SDK's {@link sdkValidateCredentialOffer}; validation errors
|
|
15
|
+
* are mapped to {@link InvalidCredentialOfferError}.
|
|
16
|
+
*/
|
|
17
|
+
export const validateCredentialOffer = async _ref => {
|
|
18
|
+
let {
|
|
19
|
+
offer,
|
|
20
|
+
credentialIssuerMetadata
|
|
21
|
+
} = _ref;
|
|
22
|
+
await sdkValidateCredentialOffer({
|
|
23
|
+
config: sdkConfigV1_3,
|
|
24
|
+
credentialOffer: offer,
|
|
25
|
+
credentialIssuerMetadata
|
|
26
|
+
}).catch(e => {
|
|
27
|
+
if (e instanceof CredentialOfferError) {
|
|
28
|
+
throw new InvalidCredentialOfferError(e.message);
|
|
29
|
+
}
|
|
30
|
+
throw e;
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=03-validate-credential-offer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["validateCredentialOffer","sdkValidateCredentialOffer","CredentialOfferError","InvalidCredentialOfferError","sdkConfigV1_3","_ref","offer","credentialIssuerMetadata","config","credentialOffer","catch","e","message"],"sourceRoot":"../../../../../src","sources":["credential/offer/v1.3.3/03-validate-credential-offer.ts"],"mappings":"AAAA,SACEA,uBAAuB,IAAIC,0BAA0B,EACrDC,oBAAoB,QACf,2BAA2B;AAClC,SAASC,2BAA2B,QAAQ,kBAAkB;AAE9D,SAASC,aAAa,QAAQ,uBAAuB;;AAErD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMJ,uBAA4D,GACvE,MAAAK,IAAA,IAA+C;EAAA,IAAxC;IAAEC,KAAK;IAAEC;EAAyB,CAAC,GAAAF,IAAA;EACxC,MAAMJ,0BAA0B,CAAC;IAC/BO,MAAM,EAAEJ,aAAa;IACrBK,eAAe,EAAEH,KAAK;IACtBC;EACF,CAAC,CAAC,CAACG,KAAK,CAAEC,CAAU,IAAK;IACvB,IAAIA,CAAC,YAAYT,oBAAoB,EAAE;MACrC,MAAM,IAAIC,2BAA2B,CAACQ,CAAC,CAACC,OAAO,CAAC;IAClD;IACA,MAAMD,CAAC;EACT,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { resolveCredentialOffer } from "./01-resolve-credential-offer";
|
|
2
2
|
import { extractGrantDetails } from "./02-extract-grant-details";
|
|
3
|
+
import { validateCredentialOffer } from "./03-validate-credential-offer";
|
|
3
4
|
export const Offer = {
|
|
4
5
|
resolveCredentialOffer,
|
|
5
|
-
extractGrantDetails
|
|
6
|
+
extractGrantDetails,
|
|
7
|
+
validateCredentialOffer
|
|
6
8
|
};
|
|
7
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["resolveCredentialOffer","extractGrantDetails","Offer"],"sourceRoot":"../../../../../src","sources":["credential/offer/v1.3.3/index.ts"],"mappings":"AACA,SAASA,sBAAsB,QAAQ,+BAA+B;AACtE,SAASC,mBAAmB,QAAQ,4BAA4B;
|
|
1
|
+
{"version":3,"names":["resolveCredentialOffer","extractGrantDetails","validateCredentialOffer","Offer"],"sourceRoot":"../../../../../src","sources":["credential/offer/v1.3.3/index.ts"],"mappings":"AACA,SAASA,sBAAsB,QAAQ,+BAA+B;AACtE,SAASC,mBAAmB,QAAQ,4BAA4B;AAChE,SAASC,uBAAuB,QAAQ,gCAAgC;AAExE,OAAO,MAAMC,KAAe,GAAG;EAC7BH,sBAAsB;EACtBC,mBAAmB;EACnBC;AACF,CAAC"}
|
|
@@ -7,10 +7,14 @@ export interface EvaluateIssuerTrustApi {
|
|
|
7
7
|
*
|
|
8
8
|
* @param issuerUrl The base url of the Issuer
|
|
9
9
|
* @param context.appFetch (optional) fetch api implementation. Default: built-in fetch
|
|
10
|
+
* @param context.authorizationServer (optional) Authorization Server URL selected
|
|
11
|
+
* from a credential offer. When provided it must match one of the Credential
|
|
12
|
+
* Issuer metadata `authorization_servers`. Only honored from v1.3.3 onwards.
|
|
10
13
|
* @returns The Issuer's configuration
|
|
11
14
|
*/
|
|
12
15
|
evaluateIssuerTrust(issuerUrl: string, ctx?: {
|
|
13
16
|
appFetch?: GlobalFetch["fetch"];
|
|
17
|
+
authorizationServer?: string;
|
|
14
18
|
}): Promise<{
|
|
15
19
|
issuerConf: IssuerConfig;
|
|
16
20
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"01-evaluate-issuer-trust.d.ts","sourceRoot":"","sources":["../../../../../src/credential/issuance/api/01-evaluate-issuer-trust.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,MAAM,WAAW,sBAAsB;IACrC
|
|
1
|
+
{"version":3,"file":"01-evaluate-issuer-trust.d.ts","sourceRoot":"","sources":["../../../../../src/credential/issuance/api/01-evaluate-issuer-trust.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,MAAM,WAAW,sBAAsB;IACrC;;;;;;;;;;;OAWG;IACH,mBAAmB,CACjB,SAAS,EAAE,MAAM,EACjB,GAAG,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;QAAC,mBAAmB,CAAC,EAAE,MAAM,CAAA;KAAE,GACtE,OAAO,CAAC;QAAE,UAAU,EAAE,YAAY,CAAA;KAAE,CAAC,CAAC;CAC1C"}
|
|
@@ -26,6 +26,8 @@ export interface StartUserAuthorizationApi {
|
|
|
26
26
|
* @param context.walletInstanceAttestation: the Wallet Instance's attestation
|
|
27
27
|
* @param context.redirectUri: the redirect URI
|
|
28
28
|
* @param context.appFetch: (optional) the fetch implementation
|
|
29
|
+
* @param context.scope: (optional) the OAuth 2.0 scope, forwarded to the PAR. When the issuance is started from a Credential Offer, it comes from the `authorization_code` grant.
|
|
30
|
+
* @param context.issuerState: (optional) the issuer state, forwarded to the PAR to correlate the authorization request with the Credential Offer.
|
|
29
31
|
* @returns The URI to which the end user should be redirected to start the authentication flow, along with additional authentication parameters
|
|
30
32
|
*/
|
|
31
33
|
startUserAuthorization(issuerConf: IssuerConfig, credentialIds: string[], proof: {
|
|
@@ -38,6 +40,8 @@ export interface StartUserAuthorizationApi {
|
|
|
38
40
|
walletInstanceAttestation: string;
|
|
39
41
|
redirectUri: string;
|
|
40
42
|
appFetch?: GlobalFetch["fetch"];
|
|
43
|
+
scope?: string;
|
|
44
|
+
issuerState?: string;
|
|
41
45
|
}): Promise<{
|
|
42
46
|
issuerRequestUri: string;
|
|
43
47
|
clientId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"02-start-user-authorization.d.ts","sourceRoot":"","sources":["../../../../../src/credential/issuance/api/02-start-user-authorization.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,MAAM,WAAW,yBAAyB;IACxC
|
|
1
|
+
{"version":3,"file":"02-start-user-authorization.d.ts","sourceRoot":"","sources":["../../../../../src/credential/issuance/api/02-start-user-authorization.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,MAAM,WAAW,yBAAyB;IACxC;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,sBAAsB,CACpB,UAAU,EAAE,YAAY,EACxB,aAAa,EAAE,MAAM,EAAE,EACvB,KAAK,EACD;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,GACrB;QAAE,SAAS,EAAE,UAAU,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,EACjD,OAAO,EAAE;QACP,gBAAgB,EAAE,aAAa,CAAC;QAChC,yBAAyB,EAAE,MAAM,CAAC;QAClC,WAAW,EAAE,MAAM,CAAC;QACpB,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;QAChC,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,GACA,OAAO,CAAC;QACT,gBAAgB,EAAE,MAAM,CAAC;QACzB,QAAQ,EAAE,MAAM,CAAC;QACjB,YAAY,EAAE,MAAM,CAAC;QACrB,oBAAoB,EAAE,mBAAmB,EAAE,CAAC;QAC5C,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB,CAAC,CAAC;CACJ"}
|
|
@@ -5,6 +5,7 @@ import { z } from "zod";
|
|
|
5
5
|
export type IssuerConfig = z.infer<typeof IssuerConfig>;
|
|
6
6
|
export declare const IssuerConfig: z.ZodObject<{
|
|
7
7
|
credential_issuer: z.ZodString;
|
|
8
|
+
authorization_servers: z.ZodOptional<z.ZodTuple<[z.ZodString], z.ZodString>>;
|
|
8
9
|
pushed_authorization_request_endpoint: z.ZodString;
|
|
9
10
|
authorization_endpoint: z.ZodString;
|
|
10
11
|
token_endpoint: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IssuerConfig.d.ts","sourceRoot":"","sources":["../../../../../src/credential/issuance/api/IssuerConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA8CxB;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AACxD,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"IssuerConfig.d.ts","sourceRoot":"","sources":["../../../../../src/credential/issuance/api/IssuerConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA8CxB;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AACxD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAuBvB,CAAC"}
|
|
@@ -297,6 +297,7 @@ export declare const mapToIssuerConfig: (input: {
|
|
|
297
297
|
logo_uri?: string | undefined;
|
|
298
298
|
contacts?: string[] | undefined;
|
|
299
299
|
};
|
|
300
|
+
authorization_servers?: [string, ...string[]] | undefined;
|
|
300
301
|
status_assertion_endpoint?: string | undefined;
|
|
301
302
|
credential_issuance_batch_size?: number | undefined;
|
|
302
303
|
encrypted_response_enc_values_supported?: string[] | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mappers.d.ts","sourceRoot":"","sources":["../../../../../src/credential/issuance/v1.0.0/mappers.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"mappers.d.ts","sourceRoot":"","sources":["../../../../../src/credential/issuance/v1.0.0/mappers.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgC5B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"01-evaluate-issuer-trust.d.ts","sourceRoot":"","sources":["../../../../../src/credential/issuance/v1.3.3/01-evaluate-issuer-trust.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAG1C,eAAO,MAAM,mBAAmB,EAAE,WAAW,CAAC,qBAAqB,
|
|
1
|
+
{"version":3,"file":"01-evaluate-issuer-trust.d.ts","sourceRoot":"","sources":["../../../../../src/credential/issuance/v1.3.3/01-evaluate-issuer-trust.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAG1C,eAAO,MAAM,mBAAmB,EAAE,WAAW,CAAC,qBAAqB,CAclE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"02-start-user-authorization.d.ts","sourceRoot":"","sources":["../../../../../src/credential/issuance/v1.3.3/02-start-user-authorization.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAS1C,eAAO,MAAM,sBAAsB,EAAE,WAAW,CAAC,wBAAwB,
|
|
1
|
+
{"version":3,"file":"02-start-user-authorization.d.ts","sourceRoot":"","sources":["../../../../../src/credential/issuance/v1.3.3/02-start-user-authorization.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAS1C,eAAO,MAAM,sBAAsB,EAAE,WAAW,CAAC,wBAAwB,CAsGtE,CAAC"}
|