diff --git a/packages/oid4vci-issuer-store/src/agent/OID4VCIStore.ts b/packages/oid4vci-issuer-store/src/agent/OID4VCIStore.ts index ef257f4c4..62ec92448 100644 --- a/packages/oid4vci-issuer-store/src/agent/OID4VCIStore.ts +++ b/packages/oid4vci-issuer-store/src/agent/OID4VCIStore.ts @@ -32,7 +32,7 @@ export class OID4VCIStore implements IAgentPlugin { private readonly _issuerMetadataStores: Map> private readonly _authorizationServerMetadataStores: Map> - private readonly _optionStores: Map> + private readonly _optionStores: Map> private readonly defaultStoreId: string private readonly defaultNamespace: string diff --git a/packages/oid4vci-issuer-store/src/types/IOID4VCIStore.ts b/packages/oid4vci-issuer-store/src/types/IOID4VCIStore.ts index 53c6018cf..062aca025 100644 --- a/packages/oid4vci-issuer-store/src/types/IOID4VCIStore.ts +++ b/packages/oid4vci-issuer-store/src/types/IOID4VCIStore.ts @@ -1,4 +1,4 @@ -import { AuthorizationServerMetadata, CredentialIssuerMetadataOpts, IssuerMetadata } from '@sphereon/oid4vci-common' +import { AuthorizationServerMetadata, ClientMetadata, CredentialIssuerMetadataOpts, IssuerMetadata } from '@sphereon/oid4vci-common' import { IDIDOptions, ResolveOpts } from '@sphereon/ssi-sdk-ext.did-utils' import { ManagedIdentifierOptsOrResult } from '@sphereon/ssi-sdk-ext.identifier-resolution' import { IKeyValueStore, IValueData } from '@sphereon/ssi-sdk.kv-store-temp' @@ -57,6 +57,7 @@ export interface IIssuerInstanceOptions extends IMetadataOptions { } export interface IIssuerOptions { + asClientOpts?: ClientMetadata idOpts?: ManagedIdentifierOptsOrResult resolveOpts?: ResolveOpts /** diff --git a/packages/oid4vci-issuer/src/functions.ts b/packages/oid4vci-issuer/src/functions.ts index 74cf00fdf..6a7c16853 100644 --- a/packages/oid4vci-issuer/src/functions.ts +++ b/packages/oid4vci-issuer/src/functions.ts @@ -288,13 +288,15 @@ export async function createVciIssuerBuilder( // builder.withUserPinRequired(issuerOpts.userPinRequired ?? false) was removed from implementers draft v1 builder.withCredentialSignerCallback(await getCredentialSignerCallback(idOpts, context)) builder.withJWTVerifyCallback(getJwtVerifyCallback({ verifyOpts: jwtVerifyOpts }, context)) + if (issuerOpts.asClientOpts) { + builder.withASClientMetadata(issuerOpts.asClientOpts) + } if (args.credentialDataSupplier) { builder.withCredentialDataSupplier(args.credentialDataSupplier) } builder.withInMemoryCNonceState() builder.withInMemoryCredentialOfferState() builder.withInMemoryCredentialOfferURIState() - builder.build() return builder } diff --git a/packages/oid4vci-issuer/src/types/IOID4VCIIssuer.ts b/packages/oid4vci-issuer/src/types/IOID4VCIIssuer.ts index 5866485ca..d53304d39 100644 --- a/packages/oid4vci-issuer/src/types/IOID4VCIIssuer.ts +++ b/packages/oid4vci-issuer/src/types/IOID4VCIIssuer.ts @@ -1,6 +1,7 @@ import { AccessTokenRequest, AccessTokenResponse, + ClientMetadata, CredentialConfigurationSupported, CredentialDataSupplierInput, CredentialIssuerMetadataOpts, @@ -74,6 +75,7 @@ export interface IIssuerInstanceOptions extends IMetadataOptions { } export interface IIssuerOptions { + asClientOpts?: ClientMetadata idOpts?: ManagedIdentifierOptsOrResult resolveOpts?: ResolveOpts /** diff --git a/packages/sd-jwt/src/__tests__/resources/BoardingPassCredential-vct.json b/packages/sd-jwt/src/__tests__/resources/BoardingPassCredential-vct.json index 94b4f55e8..5f5243a98 100644 --- a/packages/sd-jwt/src/__tests__/resources/BoardingPassCredential-vct.json +++ b/packages/sd-jwt/src/__tests__/resources/BoardingPassCredential-vct.json @@ -40,9 +40,7 @@ "lang": "en-US" } ], - "path": [ - "boardingPass" - ] + "path": ["boardingPass"] }, { "display": [ @@ -52,10 +50,7 @@ "lang": "en-US" } ], - "path": [ - "boardingPass", - "barcodeString" - ] + "path": ["boardingPass", "barcodeString"] }, { "display": [ @@ -65,10 +60,7 @@ "lang": "en-US" } ], - "path": [ - "boardingPass", - "paxName" - ] + "path": ["boardingPass", "paxName"] }, { "display": [ @@ -78,10 +70,7 @@ "lang": "en-US" } ], - "path": [ - "boardingPass", - "segmentCount" - ] + "path": ["boardingPass", "segmentCount"] }, { "display": [ @@ -91,10 +80,7 @@ "lang": "en-US" } ], - "path": [ - "boardingPass", - "ticketLessOrElectronicTicketInd" - ] + "path": ["boardingPass", "ticketLessOrElectronicTicketInd"] }, { "display": [ @@ -104,11 +90,7 @@ "lang": "en-US" } ], - "path": [ - "boardingPass", - "paxSegments", - null - ] + "path": ["boardingPass", "paxSegments", null] }, { "display": [ @@ -118,12 +100,7 @@ "lang": "en-US" } ], - "path": [ - "boardingPass", - "paxSegments", - null, - "bookingRefID" - ] + "path": ["boardingPass", "paxSegments", null, "bookingRefID"] }, { "display": [ @@ -133,12 +110,7 @@ "lang": "en-US" } ], - "path": [ - "boardingPass", - "paxSegments", - null, - "checkInOrdinal" - ] + "path": ["boardingPass", "paxSegments", null, "checkInOrdinal"] }, { "display": [ @@ -148,12 +120,7 @@ "lang": "en-US" } ], - "path": [ - "boardingPass", - "paxSegments", - null, - "compartmentTypeCode" - ] + "path": ["boardingPass", "paxSegments", null, "compartmentTypeCode"] }, { "display": [ @@ -163,12 +130,7 @@ "lang": "en-US" } ], - "path": [ - "boardingPass", - "paxSegments", - null, - "originStationIATALocationCode" - ] + "path": ["boardingPass", "paxSegments", null, "originStationIATALocationCode"] }, { "display": [ @@ -178,12 +140,7 @@ "lang": "en-US" } ], - "path": [ - "boardingPass", - "paxSegments", - null, - "destStationIATALocationCode" - ] + "path": ["boardingPass", "paxSegments", null, "destStationIATALocationCode"] }, { "display": [ @@ -193,12 +150,7 @@ "lang": "en-US" } ], - "path": [ - "boardingPass", - "paxSegments", - null, - "flightIdentifierDate" - ] + "path": ["boardingPass", "paxSegments", null, "flightIdentifierDate"] }, { "display": [ @@ -208,12 +160,7 @@ "lang": "en-US" } ], - "path": [ - "boardingPass", - "paxSegments", - null, - "operatingCarrierAirlineDesigCode" - ] + "path": ["boardingPass", "paxSegments", null, "operatingCarrierAirlineDesigCode"] }, { "display": [ @@ -223,12 +170,7 @@ "lang": "en-US" } ], - "path": [ - "boardingPass", - "paxSegments", - null, - "operatingCarrierFlightNumber" - ] + "path": ["boardingPass", "paxSegments", null, "operatingCarrierFlightNumber"] }, { "display": [ @@ -238,12 +180,7 @@ "lang": "en-US" } ], - "path": [ - "boardingPass", - "paxSegments", - null, - "paxRelatedStatusCode" - ] + "path": ["boardingPass", "paxSegments", null, "paxRelatedStatusCode"] }, { "display": [ @@ -253,12 +190,7 @@ "lang": "en-US" } ], - "path": [ - "boardingPass", - "paxSegments", - null, - "seatAssignmentStatusOrSeatNumberCode" - ] + "path": ["boardingPass", "paxSegments", null, "seatAssignmentStatusOrSeatNumberCode"] } ] -} \ No newline at end of file +} diff --git a/packages/sd-jwt/src/__tests__/resources/LoyaltyProgramAccountCredential-vct.json b/packages/sd-jwt/src/__tests__/resources/LoyaltyProgramAccountCredential-vct.json index 16a8c613f..59a3e67de 100644 --- a/packages/sd-jwt/src/__tests__/resources/LoyaltyProgramAccountCredential-vct.json +++ b/packages/sd-jwt/src/__tests__/resources/LoyaltyProgramAccountCredential-vct.json @@ -40,9 +40,7 @@ "lang": "en-US" } ], - "path": [ - "loyaltyProgramAccount" - ] + "path": ["loyaltyProgramAccount"] }, { "display": [ @@ -52,10 +50,7 @@ "lang": "en-US" } ], - "path": [ - "loyaltyProgramAccount", - "givenName" - ] + "path": ["loyaltyProgramAccount", "givenName"] }, { "display": [ @@ -65,10 +60,7 @@ "lang": "en-US" } ], - "path": [ - "loyaltyProgramAccount", - "surname" - ] + "path": ["loyaltyProgramAccount", "surname"] }, { "display": [ @@ -78,10 +70,7 @@ "lang": "en-US" } ], - "path": [ - "loyaltyProgramAccount", - "titleName" - ] + "path": ["loyaltyProgramAccount", "titleName"] }, { "display": [ @@ -91,10 +80,7 @@ "lang": "en-US" } ], - "path": [ - "loyaltyProgramAccount", - "loyaltyProgramAccountIdentifier" - ] + "path": ["loyaltyProgramAccount", "loyaltyProgramAccountIdentifier"] }, { "display": [ @@ -104,10 +90,7 @@ "lang": "en-US" } ], - "path": [ - "loyaltyProgramAccount", - "loyaltyProgramAccountTierLevelCode" - ] + "path": ["loyaltyProgramAccount", "loyaltyProgramAccountTierLevelCode"] }, { "display": [ @@ -117,10 +100,7 @@ "lang": "en-US" } ], - "path": [ - "loyaltyProgramAccount", - "loyaltyProgramCode" - ] + "path": ["loyaltyProgramAccount", "loyaltyProgramCode"] }, { "display": [ @@ -130,10 +110,7 @@ "lang": "en-US" } ], - "path": [ - "loyaltyProgramAccount", - "loyaltyProgramName" - ] + "path": ["loyaltyProgramAccount", "loyaltyProgramName"] }, { "display": [ @@ -143,10 +120,7 @@ "lang": "en-US" } ], - "path": [ - "loyaltyProgramAccount", - "providerName" - ] + "path": ["loyaltyProgramAccount", "providerName"] } ] -} \ No newline at end of file +} diff --git a/packages/sd-jwt/src/__tests__/resources/ePassport VC Schema V1.0.sd-jwt.json b/packages/sd-jwt/src/__tests__/resources/ePassport VC Schema V1.0.sd-jwt.json index 66a48f5bf..2123f2a2e 100644 --- a/packages/sd-jwt/src/__tests__/resources/ePassport VC Schema V1.0.sd-jwt.json +++ b/packages/sd-jwt/src/__tests__/resources/ePassport VC Schema V1.0.sd-jwt.json @@ -40,9 +40,7 @@ "lang": "en-US" } ], - "path": [ - "electronicPassport" - ] + "path": ["electronicPassport"] }, { "display": [ @@ -52,10 +50,7 @@ "lang": "en-US" } ], - "path": [ - "electronicPassport", - "dataGroup1" - ] + "path": ["electronicPassport", "dataGroup1"] }, { "display": [ @@ -65,11 +60,7 @@ "lang": "en-US" } ], - "path": [ - "electronicPassport", - "dataGroup1", - "birthdate" - ] + "path": ["electronicPassport", "dataGroup1", "birthdate"] }, { "display": [ @@ -79,11 +70,7 @@ "lang": "en-US" } ], - "path": [ - "electronicPassport", - "dataGroup1", - "docTypeCode" - ] + "path": ["electronicPassport", "dataGroup1", "docTypeCode"] }, { "display": [ @@ -93,11 +80,7 @@ "lang": "en-US" } ], - "path": [ - "electronicPassport", - "dataGroup1", - "expiryDate" - ] + "path": ["electronicPassport", "dataGroup1", "expiryDate"] }, { "display": [ @@ -107,11 +90,7 @@ "lang": "en-US" } ], - "path": [ - "electronicPassport", - "dataGroup1", - "sexCode" - ] + "path": ["electronicPassport", "dataGroup1", "sexCode"] }, { "display": [ @@ -121,11 +100,7 @@ "lang": "en-US" } ], - "path": [ - "electronicPassport", - "dataGroup1", - "holdersName" - ] + "path": ["electronicPassport", "dataGroup1", "holdersName"] }, { "display": [ @@ -135,11 +110,7 @@ "lang": "en-US" } ], - "path": [ - "electronicPassport", - "dataGroup1", - "issuerCode" - ] + "path": ["electronicPassport", "dataGroup1", "issuerCode"] }, { "display": [ @@ -149,11 +120,7 @@ "lang": "en-US" } ], - "path": [ - "electronicPassport", - "dataGroup1", - "natlCode" - ] + "path": ["electronicPassport", "dataGroup1", "natlCode"] }, { "display": [ @@ -163,11 +130,7 @@ "lang": "en-US" } ], - "path": [ - "electronicPassport", - "dataGroup1", - "passportNumberIdentifier" - ] + "path": ["electronicPassport", "dataGroup1", "passportNumberIdentifier"] }, { "display": [ @@ -177,11 +140,7 @@ "lang": "en-US" } ], - "path": [ - "electronicPassport", - "dataGroup2EncodedFaceBiometrics", - "faceBiometricDataEncodedPicture" - ] + "path": ["electronicPassport", "dataGroup2EncodedFaceBiometrics", "faceBiometricDataEncodedPicture"] }, { "display": [ @@ -191,10 +150,7 @@ "lang": "en-US" } ], - "path": [ - "electronicPassport", - "dataGroup15" - ] + "path": ["electronicPassport", "dataGroup15"] }, { "display": [ @@ -204,12 +160,7 @@ "lang": "en-US" } ], - "path": [ - "electronicPassport", - "dataGroup15", - "activeAuthentication", - "publicKeyBinaryObject" - ] + "path": ["electronicPassport", "dataGroup15", "activeAuthentication", "publicKeyBinaryObject"] }, { "display": [ @@ -219,10 +170,7 @@ "lang": "en-US" } ], - "path": [ - "electronicPassport", - "docSecurityObject" - ] + "path": ["electronicPassport", "docSecurityObject"] }, { "display": [ @@ -232,11 +180,7 @@ "lang": "en-US" } ], - "path": [ - "electronicPassport", - "docSecurityObject", - "digestHashAlgorithmIdentifier" - ] + "path": ["electronicPassport", "docSecurityObject", "digestHashAlgorithmIdentifier"] }, { "display": [ @@ -246,11 +190,7 @@ "lang": "en-US" } ], - "path": [ - "electronicPassport", - "docSecurityObject", - "versionNumber" - ] + "path": ["electronicPassport", "docSecurityObject", "versionNumber"] }, { "display": [ @@ -260,12 +200,7 @@ "lang": "en-US" } ], - "path": [ - "electronicPassport", - "docSecurityObject", - "dataGroupHash", - null - ] + "path": ["electronicPassport", "docSecurityObject", "dataGroupHash", null] }, { "display": [ @@ -275,13 +210,7 @@ "lang": "en-US" } ], - "path": [ - "electronicPassport", - "docSecurityObject", - "dataGroupHash", - null, - "dataGroupNumber" - ] + "path": ["electronicPassport", "docSecurityObject", "dataGroupHash", null, "dataGroupNumber"] }, { "display": [ @@ -291,13 +220,7 @@ "lang": "en-US" } ], - "path": [ - "electronicPassport", - "docSecurityObject", - "dataGroupHash", - null, - "valueBinaryObject" - ] + "path": ["electronicPassport", "docSecurityObject", "dataGroupHash", null, "valueBinaryObject"] } ] -} \ No newline at end of file +} diff --git a/packages/sd-jwt/src/__tests__/resources/travel-agency-EmployeeAgencyCredential-vct.json b/packages/sd-jwt/src/__tests__/resources/travel-agency-EmployeeAgencyCredential-vct.json index ff2d91550..8fbe9ef6a 100644 --- a/packages/sd-jwt/src/__tests__/resources/travel-agency-EmployeeAgencyCredential-vct.json +++ b/packages/sd-jwt/src/__tests__/resources/travel-agency-EmployeeAgencyCredential-vct.json @@ -40,9 +40,7 @@ "lang": "en-US" } ], - "path": [ - "employee" - ] + "path": ["employee"] }, { "display": [ @@ -52,10 +50,7 @@ "lang": "en-US" } ], - "path": [ - "employee", - "salutation" - ] + "path": ["employee", "salutation"] }, { "display": [ @@ -65,10 +60,7 @@ "lang": "en-US" } ], - "path": [ - "employee", - "givenName" - ] + "path": ["employee", "givenName"] }, { "display": [ @@ -78,10 +70,7 @@ "lang": "en-US" } ], - "path": [ - "employee", - "surname" - ] + "path": ["employee", "surname"] }, { "display": [ @@ -91,10 +80,7 @@ "lang": "en-US" } ], - "path": [ - "employee", - "phoneNumber" - ] + "path": ["employee", "phoneNumber"] }, { "display": [ @@ -104,11 +90,7 @@ "lang": "en-US" } ], - "path": [ - "employee", - "phoneNumber", - "countryCode" - ] + "path": ["employee", "phoneNumber", "countryCode"] }, { "display": [ @@ -118,11 +100,7 @@ "lang": "en-US" } ], - "path": [ - "employee", - "phoneNumber", - "localNumber" - ] + "path": ["employee", "phoneNumber", "localNumber"] }, { "display": [ @@ -132,10 +110,7 @@ "lang": "en-US" } ], - "path": [ - "employee", - "employeeID" - ] + "path": ["employee", "employeeID"] }, { "display": [ @@ -145,10 +120,7 @@ "lang": "en-US" } ], - "path": [ - "employee", - "email" - ] + "path": ["employee", "email"] }, { "display": [ @@ -158,10 +130,7 @@ "lang": "en-US" } ], - "path": [ - "employee", - "jobTitle" - ] + "path": ["employee", "jobTitle"] }, { "display": [ @@ -171,11 +140,7 @@ "lang": "en-US" } ], - "path": [ - "employee", - "pcc", - null - ] + "path": ["employee", "pcc", null] } ] -} \ No newline at end of file +}