@credo-ts/openid4vc 0.6.1-pr-2091-20241119140918 → 0.6.2-alpha-20251210145840
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/build/OpenId4VcApi.d.mts +24 -0
- package/build/OpenId4VcApi.d.mts.map +1 -0
- package/build/OpenId4VcApi.mjs +35 -0
- package/build/OpenId4VcApi.mjs.map +1 -0
- package/build/OpenId4VcModule.d.mts +30 -0
- package/build/OpenId4VcModule.d.mts.map +1 -0
- package/build/OpenId4VcModule.mjs +42 -0
- package/build/OpenId4VcModule.mjs.map +1 -0
- package/build/OpenId4VcModuleConfig.d.mts +44 -0
- package/build/OpenId4VcModuleConfig.d.mts.map +1 -0
- package/build/OpenId4VcModuleConfig.mjs +24 -0
- package/build/OpenId4VcModuleConfig.mjs.map +1 -0
- package/build/_virtual/_@oxc-project_runtime@0.99.0/helpers/decorate.mjs +10 -0
- package/build/_virtual/_@oxc-project_runtime@0.99.0/helpers/decorateMetadata.mjs +7 -0
- package/build/_virtual/_@oxc-project_runtime@0.99.0/helpers/decorateParam.mjs +9 -0
- package/build/index.d.mts +42 -0
- package/build/index.mjs +37 -0
- package/build/openid4vc-holder/OpenId4VcHolderApi.d.mts +238 -0
- package/build/openid4vc-holder/OpenId4VcHolderApi.d.mts.map +1 -0
- package/build/openid4vc-holder/OpenId4VcHolderApi.mjs +174 -0
- package/build/openid4vc-holder/OpenId4VcHolderApi.mjs.map +1 -0
- package/build/openid4vc-holder/OpenId4VcHolderModule.d.mts +17 -0
- package/build/openid4vc-holder/OpenId4VcHolderModule.d.mts.map +1 -0
- package/build/openid4vc-holder/OpenId4VcHolderModule.mjs +23 -0
- package/build/openid4vc-holder/OpenId4VcHolderModule.mjs.map +1 -0
- package/build/openid4vc-holder/OpenId4VciHolderService.d.mts +69 -0
- package/build/openid4vc-holder/OpenId4VciHolderService.d.mts.map +1 -0
- package/build/openid4vc-holder/OpenId4VciHolderService.mjs +751 -0
- package/build/openid4vc-holder/OpenId4VciHolderService.mjs.map +1 -0
- package/build/openid4vc-holder/OpenId4VciHolderServiceOptions.d.mts +398 -0
- package/build/openid4vc-holder/OpenId4VciHolderServiceOptions.d.mts.map +1 -0
- package/build/openid4vc-holder/OpenId4VciHolderServiceOptions.mjs +16 -0
- package/build/openid4vc-holder/OpenId4VciHolderServiceOptions.mjs.map +1 -0
- package/build/openid4vc-holder/OpenId4vpHolderService.d.mts +130 -0
- package/build/openid4vc-holder/OpenId4vpHolderService.d.mts.map +1 -0
- package/build/openid4vc-holder/OpenId4vpHolderService.mjs +278 -0
- package/build/openid4vc-holder/OpenId4vpHolderService.mjs.map +1 -0
- package/build/openid4vc-holder/OpenId4vpHolderServiceOptions.d.mts +112 -0
- package/build/openid4vc-holder/OpenId4vpHolderServiceOptions.d.mts.map +1 -0
- package/build/openid4vc-holder/index.d.mts +6 -0
- package/build/openid4vc-holder/index.mjs +5 -0
- package/build/openid4vc-issuer/OpenId4VcIssuanceSessionState.d.mts +16 -0
- package/build/openid4vc-issuer/OpenId4VcIssuanceSessionState.d.mts.map +1 -0
- package/build/openid4vc-issuer/OpenId4VcIssuanceSessionState.mjs +18 -0
- package/build/openid4vc-issuer/OpenId4VcIssuanceSessionState.mjs.map +1 -0
- package/build/openid4vc-issuer/OpenId4VcIssuerApi.d.mts +137 -0
- package/build/openid4vc-issuer/OpenId4VcIssuerApi.d.mts.map +1 -0
- package/build/openid4vc-issuer/OpenId4VcIssuerApi.mjs +108 -0
- package/build/openid4vc-issuer/OpenId4VcIssuerApi.mjs.map +1 -0
- package/build/openid4vc-issuer/OpenId4VcIssuerEvents.d.mts +19 -0
- package/build/openid4vc-issuer/OpenId4VcIssuerEvents.d.mts.map +1 -0
- package/build/openid4vc-issuer/OpenId4VcIssuerEvents.mjs +9 -0
- package/build/openid4vc-issuer/OpenId4VcIssuerEvents.mjs.map +1 -0
- package/build/openid4vc-issuer/OpenId4VcIssuerModule.d.mts +27 -0
- package/build/openid4vc-issuer/OpenId4VcIssuerModule.d.mts.map +1 -0
- package/build/openid4vc-issuer/OpenId4VcIssuerModule.mjs +150 -0
- package/build/openid4vc-issuer/OpenId4VcIssuerModule.mjs.map +1 -0
- package/build/openid4vc-issuer/OpenId4VcIssuerModuleConfig.d.mts +279 -0
- package/build/openid4vc-issuer/OpenId4VcIssuerModuleConfig.d.mts.map +1 -0
- package/build/openid4vc-issuer/OpenId4VcIssuerModuleConfig.mjs +179 -0
- package/build/openid4vc-issuer/OpenId4VcIssuerModuleConfig.mjs.map +1 -0
- package/build/openid4vc-issuer/OpenId4VcIssuerService.d.mts +182 -0
- package/build/openid4vc-issuer/OpenId4VcIssuerService.d.mts.map +1 -0
- package/build/openid4vc-issuer/OpenId4VcIssuerService.mjs +881 -0
- package/build/openid4vc-issuer/OpenId4VcIssuerService.mjs.map +1 -0
- package/build/openid4vc-issuer/OpenId4VcIssuerServiceOptions.d.mts +340 -0
- package/build/openid4vc-issuer/OpenId4VcIssuerServiceOptions.d.mts.map +1 -0
- package/build/openid4vc-issuer/OpenId4VcIssuerServiceOptions.mjs +1 -0
- package/build/openid4vc-issuer/index.d.mts +11 -0
- package/build/openid4vc-issuer/index.mjs +11 -0
- package/build/openid4vc-issuer/repository/OpenId4VcIssuanceSessionRecord.d.mts +300 -0
- package/build/openid4vc-issuer/repository/OpenId4VcIssuanceSessionRecord.d.mts.map +1 -0
- package/build/openid4vc-issuer/repository/OpenId4VcIssuanceSessionRecord.mjs +102 -0
- package/build/openid4vc-issuer/repository/OpenId4VcIssuanceSessionRecord.mjs.map +1 -0
- package/build/openid4vc-issuer/repository/OpenId4VcIssuanceSessionRepository.d.mts +10 -0
- package/build/openid4vc-issuer/repository/OpenId4VcIssuanceSessionRepository.d.mts.map +1 -0
- package/build/openid4vc-issuer/repository/OpenId4VcIssuanceSessionRepository.mjs +22 -0
- package/build/openid4vc-issuer/repository/OpenId4VcIssuanceSessionRepository.mjs.map +1 -0
- package/build/openid4vc-issuer/repository/OpenId4VcIssuerRecord.d.mts +84 -0
- package/build/openid4vc-issuer/repository/OpenId4VcIssuerRecord.d.mts.map +1 -0
- package/build/openid4vc-issuer/repository/OpenId4VcIssuerRecord.mjs +89 -0
- package/build/openid4vc-issuer/repository/OpenId4VcIssuerRecord.mjs.map +1 -0
- package/build/openid4vc-issuer/repository/OpenId4VcIssuerRepository.d.mts +12 -0
- package/build/openid4vc-issuer/repository/OpenId4VcIssuerRepository.d.mts.map +1 -0
- package/build/openid4vc-issuer/repository/OpenId4VcIssuerRepository.mjs +28 -0
- package/build/openid4vc-issuer/repository/OpenId4VcIssuerRepository.mjs.map +1 -0
- package/build/openid4vc-issuer/repository/index.d.mts +4 -0
- package/build/openid4vc-issuer/repository/index.mjs +4 -0
- package/build/openid4vc-issuer/router/accessTokenEndpoint.mjs +199 -0
- package/build/openid4vc-issuer/router/accessTokenEndpoint.mjs.map +1 -0
- package/build/openid4vc-issuer/router/authorizationChallengeEndpoint.mjs +241 -0
- package/build/openid4vc-issuer/router/authorizationChallengeEndpoint.mjs.map +1 -0
- package/build/openid4vc-issuer/router/authorizationEndpoint.mjs +51 -0
- package/build/openid4vc-issuer/router/authorizationEndpoint.mjs.map +1 -0
- package/build/openid4vc-issuer/router/authorizationServerMetadataEndpoint.mjs +25 -0
- package/build/openid4vc-issuer/router/authorizationServerMetadataEndpoint.mjs.map +1 -0
- package/build/openid4vc-issuer/router/credentialEndpoint.mjs +142 -0
- package/build/openid4vc-issuer/router/credentialEndpoint.mjs.map +1 -0
- package/build/openid4vc-issuer/router/credentialOfferEndpoint.mjs +38 -0
- package/build/openid4vc-issuer/router/credentialOfferEndpoint.mjs.map +1 -0
- package/build/openid4vc-issuer/router/deferredCredentialEndpoint.mjs +84 -0
- package/build/openid4vc-issuer/router/deferredCredentialEndpoint.mjs.map +1 -0
- package/build/openid4vc-issuer/router/index.mjs +12 -0
- package/build/openid4vc-issuer/router/issuerMetadataEndpoint.mjs +43 -0
- package/build/openid4vc-issuer/router/issuerMetadataEndpoint.mjs.map +1 -0
- package/build/openid4vc-issuer/router/jwksEndpoint.mjs +18 -0
- package/build/openid4vc-issuer/router/jwksEndpoint.mjs.map +1 -0
- package/build/openid4vc-issuer/router/nonceEndpoint.mjs +29 -0
- package/build/openid4vc-issuer/router/nonceEndpoint.mjs.map +1 -0
- package/build/openid4vc-issuer/router/pushedAuthorizationRequestEndpoint.mjs +164 -0
- package/build/openid4vc-issuer/router/pushedAuthorizationRequestEndpoint.mjs.map +1 -0
- package/build/openid4vc-issuer/router/redirectEndpoint.mjs +124 -0
- package/build/openid4vc-issuer/router/redirectEndpoint.mjs.map +1 -0
- package/build/openid4vc-issuer/util/txCode.mjs +18 -0
- package/build/openid4vc-issuer/util/txCode.mjs.map +1 -0
- package/build/openid4vc-verifier/OpenId4VcVerificationSessionState.d.mts +10 -0
- package/build/openid4vc-verifier/OpenId4VcVerificationSessionState.d.mts.map +1 -0
- package/build/openid4vc-verifier/OpenId4VcVerificationSessionState.mjs +12 -0
- package/build/openid4vc-verifier/OpenId4VcVerificationSessionState.mjs.map +1 -0
- package/build/openid4vc-verifier/OpenId4VcVerifierApi.d.mts +60 -0
- package/build/openid4vc-verifier/OpenId4VcVerifierApi.d.mts.map +1 -0
- package/build/openid4vc-verifier/OpenId4VcVerifierApi.mjs +83 -0
- package/build/openid4vc-verifier/OpenId4VcVerifierApi.mjs.map +1 -0
- package/build/openid4vc-verifier/OpenId4VcVerifierEvents.d.mts +19 -0
- package/build/openid4vc-verifier/OpenId4VcVerifierEvents.d.mts.map +1 -0
- package/build/openid4vc-verifier/OpenId4VcVerifierEvents.mjs +9 -0
- package/build/openid4vc-verifier/OpenId4VcVerifierEvents.mjs.map +1 -0
- package/build/openid4vc-verifier/OpenId4VcVerifierModule.d.mts +25 -0
- package/build/openid4vc-verifier/OpenId4VcVerifierModule.d.mts.map +1 -0
- package/build/openid4vc-verifier/OpenId4VcVerifierModule.mjs +91 -0
- package/build/openid4vc-verifier/OpenId4VcVerifierModule.mjs.map +1 -0
- package/build/openid4vc-verifier/OpenId4VcVerifierModuleConfig.d.mts +55 -0
- package/build/openid4vc-verifier/OpenId4VcVerifierModuleConfig.d.mts.map +1 -0
- package/build/openid4vc-verifier/OpenId4VcVerifierModuleConfig.mjs +36 -0
- package/build/openid4vc-verifier/OpenId4VcVerifierModuleConfig.mjs.map +1 -0
- package/build/openid4vc-verifier/OpenId4VpVerifierService.d.mts +60 -0
- package/build/openid4vc-verifier/OpenId4VpVerifierService.d.mts.map +1 -0
- package/build/openid4vc-verifier/OpenId4VpVerifierService.mjs +714 -0
- package/build/openid4vc-verifier/OpenId4VpVerifierService.mjs.map +1 -0
- package/build/openid4vc-verifier/OpenId4VpVerifierServiceOptions.d.mts +194 -0
- package/build/openid4vc-verifier/OpenId4VpVerifierServiceOptions.d.mts.map +1 -0
- package/build/openid4vc-verifier/index.d.mts +12 -0
- package/build/openid4vc-verifier/index.mjs +11 -0
- package/build/openid4vc-verifier/repository/OpenId4VcVerificationSessionRecord.d.mts +129 -0
- package/build/openid4vc-verifier/repository/OpenId4VcVerificationSessionRecord.d.mts.map +1 -0
- package/build/openid4vc-verifier/repository/OpenId4VcVerificationSessionRecord.mjs +64 -0
- package/build/openid4vc-verifier/repository/OpenId4VcVerificationSessionRecord.mjs.map +1 -0
- package/build/openid4vc-verifier/repository/OpenId4VcVerificationSessionRepository.d.mts +10 -0
- package/build/openid4vc-verifier/repository/OpenId4VcVerificationSessionRepository.d.mts.map +1 -0
- package/build/openid4vc-verifier/repository/OpenId4VcVerificationSessionRepository.mjs +22 -0
- package/build/openid4vc-verifier/repository/OpenId4VcVerificationSessionRepository.mjs.map +1 -0
- package/build/openid4vc-verifier/repository/OpenId4VcVerifierRecord.d.mts +33 -0
- package/build/openid4vc-verifier/repository/OpenId4VcVerifierRecord.d.mts.map +1 -0
- package/build/openid4vc-verifier/repository/OpenId4VcVerifierRecord.mjs +32 -0
- package/build/openid4vc-verifier/repository/OpenId4VcVerifierRecord.mjs.map +1 -0
- package/build/openid4vc-verifier/repository/OpenId4VcVerifierRepository.d.mts +12 -0
- package/build/openid4vc-verifier/repository/OpenId4VcVerifierRepository.d.mts.map +1 -0
- package/build/openid4vc-verifier/repository/OpenId4VcVerifierRepository.mjs +28 -0
- package/build/openid4vc-verifier/repository/OpenId4VcVerifierRepository.mjs.map +1 -0
- package/build/openid4vc-verifier/repository/index.d.mts +4 -0
- package/build/openid4vc-verifier/repository/index.mjs +4 -0
- package/build/openid4vc-verifier/router/authorizationEndpoint.mjs +117 -0
- package/build/openid4vc-verifier/router/authorizationEndpoint.mjs.map +1 -0
- package/build/openid4vc-verifier/router/authorizationRequestEndpoint.mjs +39 -0
- package/build/openid4vc-verifier/router/authorizationRequestEndpoint.mjs.map +1 -0
- package/build/openid4vc-verifier/router/index.mjs +1 -0
- package/build/shared/callbacks.d.mts +47 -0
- package/build/shared/callbacks.d.mts.map +1 -0
- package/build/shared/callbacks.mjs +279 -0
- package/build/shared/callbacks.mjs.map +1 -0
- package/build/shared/index.d.mts +7 -0
- package/build/shared/index.mjs +4 -0
- package/build/shared/issuerMetadataUtils.d.mts +22 -0
- package/build/shared/issuerMetadataUtils.d.mts.map +1 -0
- package/build/shared/issuerMetadataUtils.mjs +30 -0
- package/build/shared/issuerMetadataUtils.mjs.map +1 -0
- package/build/shared/models/CredentialHolderBinding.d.mts +71 -0
- package/build/shared/models/CredentialHolderBinding.d.mts.map +1 -0
- package/build/shared/models/CredentialHolderBinding.mjs +1 -0
- package/build/shared/models/OpenId4VcJwtIssuer.d.mts +46 -0
- package/build/shared/models/OpenId4VcJwtIssuer.d.mts.map +1 -0
- package/build/shared/models/OpenId4VcJwtIssuer.mjs +1 -0
- package/build/shared/models/OpenId4VciAuthorizationServerConfig.d.mts +71 -0
- package/build/shared/models/OpenId4VciAuthorizationServerConfig.d.mts.map +1 -0
- package/build/shared/models/OpenId4VciCredentialFormatProfile.d.mts +12 -0
- package/build/shared/models/OpenId4VciCredentialFormatProfile.d.mts.map +1 -0
- package/build/shared/models/OpenId4VciCredentialFormatProfile.mjs +14 -0
- package/build/shared/models/OpenId4VciCredentialFormatProfile.mjs.map +1 -0
- package/build/shared/models/index.d.mts +30 -0
- package/build/shared/models/index.d.mts.map +1 -0
- package/build/shared/models/index.mjs +6 -0
- package/build/shared/router/context.mjs +52 -0
- package/build/shared/router/context.mjs.map +1 -0
- package/build/shared/router/express.browser.d.mts +5 -0
- package/build/shared/router/express.browser.d.mts.map +1 -0
- package/build/shared/router/express.browser.mjs +8 -0
- package/build/shared/router/express.browser.mjs.map +1 -0
- package/build/shared/router/express.mjs +10 -0
- package/build/shared/router/express.mjs.map +1 -0
- package/build/shared/router/express.native.d.mts +5 -0
- package/build/shared/router/express.native.d.mts.map +1 -0
- package/build/shared/router/express.native.mjs +8 -0
- package/build/shared/router/express.native.mjs.map +1 -0
- package/build/shared/router/index.mjs +3 -0
- package/build/shared/router/tenants.mjs +36 -0
- package/build/shared/router/tenants.mjs.map +1 -0
- package/build/shared/transactionData.mjs +19 -0
- package/build/shared/transactionData.mjs.map +1 -0
- package/build/shared/utils.mjs +90 -0
- package/build/shared/utils.mjs.map +1 -0
- package/package.json +30 -23
- package/build/index.d.ts +0 -4
- package/build/index.js +0 -21
- package/build/index.js.map +0 -1
- package/build/openid4vc-holder/OpenId4VcHolderApi.d.ts +0 -124
- package/build/openid4vc-holder/OpenId4VcHolderApi.js +0 -155
- package/build/openid4vc-holder/OpenId4VcHolderApi.js.map +0 -1
- package/build/openid4vc-holder/OpenId4VcHolderModule.d.ts +0 -13
- package/build/openid4vc-holder/OpenId4VcHolderModule.js +0 -35
- package/build/openid4vc-holder/OpenId4VcHolderModule.js.map +0 -1
- package/build/openid4vc-holder/OpenId4VciHolderService.d.ts +0 -72
- package/build/openid4vc-holder/OpenId4VciHolderService.js +0 -569
- package/build/openid4vc-holder/OpenId4VciHolderService.js.map +0 -1
- package/build/openid4vc-holder/OpenId4VciHolderServiceOptions.d.ts +0 -238
- package/build/openid4vc-holder/OpenId4VciHolderServiceOptions.js +0 -14
- package/build/openid4vc-holder/OpenId4VciHolderServiceOptions.js.map +0 -1
- package/build/openid4vc-holder/OpenId4vcSiopHolderService.d.ts +0 -32
- package/build/openid4vc-holder/OpenId4vcSiopHolderService.js +0 -302
- package/build/openid4vc-holder/OpenId4vcSiopHolderService.js.map +0 -1
- package/build/openid4vc-holder/OpenId4vcSiopHolderServiceOptions.d.ts +0 -38
- package/build/openid4vc-holder/OpenId4vcSiopHolderServiceOptions.js +0 -3
- package/build/openid4vc-holder/OpenId4vcSiopHolderServiceOptions.js.map +0 -1
- package/build/openid4vc-holder/index.d.ts +0 -6
- package/build/openid4vc-holder/index.js +0 -23
- package/build/openid4vc-holder/index.js.map +0 -1
- package/build/openid4vc-issuer/OpenId4VcIssuanceSessionState.d.ts +0 -12
- package/build/openid4vc-issuer/OpenId4VcIssuanceSessionState.js +0 -19
- package/build/openid4vc-issuer/OpenId4VcIssuanceSessionState.js.map +0 -1
- package/build/openid4vc-issuer/OpenId4VcIssuerApi.d.ts +0 -101
- package/build/openid4vc-issuer/OpenId4VcIssuerApi.js +0 -110
- package/build/openid4vc-issuer/OpenId4VcIssuerApi.js.map +0 -1
- package/build/openid4vc-issuer/OpenId4VcIssuerEvents.d.ts +0 -13
- package/build/openid4vc-issuer/OpenId4VcIssuerEvents.js +0 -8
- package/build/openid4vc-issuer/OpenId4VcIssuerEvents.js.map +0 -1
- package/build/openid4vc-issuer/OpenId4VcIssuerModule.d.ts +0 -21
- package/build/openid4vc-issuer/OpenId4VcIssuerModule.js +0 -121
- package/build/openid4vc-issuer/OpenId4VcIssuerModule.js.map +0 -1
- package/build/openid4vc-issuer/OpenId4VcIssuerModuleConfig.d.ts +0 -190
- package/build/openid4vc-issuer/OpenId4VcIssuerModuleConfig.js +0 -141
- package/build/openid4vc-issuer/OpenId4VcIssuerModuleConfig.js.map +0 -1
- package/build/openid4vc-issuer/OpenId4VcIssuerService.d.ts +0 -116
- package/build/openid4vc-issuer/OpenId4VcIssuerService.js +0 -698
- package/build/openid4vc-issuer/OpenId4VcIssuerService.js.map +0 -1
- package/build/openid4vc-issuer/OpenId4VcIssuerServiceOptions.d.ts +0 -229
- package/build/openid4vc-issuer/OpenId4VcIssuerServiceOptions.js +0 -3
- package/build/openid4vc-issuer/OpenId4VcIssuerServiceOptions.js.map +0 -1
- package/build/openid4vc-issuer/index.d.ts +0 -8
- package/build/openid4vc-issuer/index.js +0 -27
- package/build/openid4vc-issuer/index.js.map +0 -1
- package/build/openid4vc-issuer/repository/OpenId4VcIssuanceSessionRecord.d.ts +0 -160
- package/build/openid4vc-issuer/repository/OpenId4VcIssuanceSessionRecord.js +0 -88
- package/build/openid4vc-issuer/repository/OpenId4VcIssuanceSessionRecord.js.map +0 -1
- package/build/openid4vc-issuer/repository/OpenId4VcIssuanceSessionRepository.d.ts +0 -5
- package/build/openid4vc-issuer/repository/OpenId4VcIssuanceSessionRepository.js +0 -29
- package/build/openid4vc-issuer/repository/OpenId4VcIssuanceSessionRepository.js.map +0 -1
- package/build/openid4vc-issuer/repository/OpenId4VcIssuerRecord.d.ts +0 -56
- package/build/openid4vc-issuer/repository/OpenId4VcIssuerRecord.js +0 -83
- package/build/openid4vc-issuer/repository/OpenId4VcIssuerRecord.js.map +0 -1
- package/build/openid4vc-issuer/repository/OpenId4VcIssuerRepository.d.ts +0 -8
- package/build/openid4vc-issuer/repository/OpenId4VcIssuerRepository.js +0 -35
- package/build/openid4vc-issuer/repository/OpenId4VcIssuerRepository.js.map +0 -1
- package/build/openid4vc-issuer/repository/index.d.ts +0 -4
- package/build/openid4vc-issuer/repository/index.js +0 -21
- package/build/openid4vc-issuer/repository/index.js.map +0 -1
- package/build/openid4vc-issuer/router/accessTokenEndpoint.d.ts +0 -5
- package/build/openid4vc-issuer/router/accessTokenEndpoint.js +0 -164
- package/build/openid4vc-issuer/router/accessTokenEndpoint.js.map +0 -1
- package/build/openid4vc-issuer/router/authorizationChallengeEndpoint.d.ts +0 -3
- package/build/openid4vc-issuer/router/authorizationChallengeEndpoint.js +0 -213
- package/build/openid4vc-issuer/router/authorizationChallengeEndpoint.js.map +0 -1
- package/build/openid4vc-issuer/router/authorizationServerMetadataEndpoint.d.ts +0 -6
- package/build/openid4vc-issuer/router/authorizationServerMetadataEndpoint.js +0 -25
- package/build/openid4vc-issuer/router/authorizationServerMetadataEndpoint.js.map +0 -1
- package/build/openid4vc-issuer/router/credentialEndpoint.d.ts +0 -3
- package/build/openid4vc-issuer/router/credentialEndpoint.js +0 -176
- package/build/openid4vc-issuer/router/credentialEndpoint.js.map +0 -1
- package/build/openid4vc-issuer/router/credentialOfferEndpoint.d.ts +0 -3
- package/build/openid4vc-issuer/router/credentialOfferEndpoint.js +0 -45
- package/build/openid4vc-issuer/router/credentialOfferEndpoint.js.map +0 -1
- package/build/openid4vc-issuer/router/index.d.ts +0 -9
- package/build/openid4vc-issuer/router/index.js +0 -20
- package/build/openid4vc-issuer/router/index.js.map +0 -1
- package/build/openid4vc-issuer/router/issuerMetadataEndpoint.d.ts +0 -2
- package/build/openid4vc-issuer/router/issuerMetadataEndpoint.js +0 -26
- package/build/openid4vc-issuer/router/issuerMetadataEndpoint.js.map +0 -1
- package/build/openid4vc-issuer/router/jwksEndpoint.d.ts +0 -3
- package/build/openid4vc-issuer/router/jwksEndpoint.js +0 -20
- package/build/openid4vc-issuer/router/jwksEndpoint.js.map +0 -1
- package/build/openid4vc-issuer/router/nonceEndpoint.d.ts +0 -3
- package/build/openid4vc-issuer/router/nonceEndpoint.js +0 -26
- package/build/openid4vc-issuer/router/nonceEndpoint.js.map +0 -1
- package/build/openid4vc-issuer/router/requestContext.d.ts +0 -5
- package/build/openid4vc-issuer/router/requestContext.js +0 -3
- package/build/openid4vc-issuer/router/requestContext.js.map +0 -1
- package/build/openid4vc-issuer/util/txCode.d.ts +0 -3
- package/build/openid4vc-issuer/util/txCode.js +0 -18
- package/build/openid4vc-issuer/util/txCode.js.map +0 -1
- package/build/openid4vc-verifier/OpenId4VcSiopVerifierService.d.ts +0 -55
- package/build/openid4vc-verifier/OpenId4VcSiopVerifierService.js +0 -498
- package/build/openid4vc-verifier/OpenId4VcSiopVerifierService.js.map +0 -1
- package/build/openid4vc-verifier/OpenId4VcSiopVerifierServiceOptions.d.ts +0 -77
- package/build/openid4vc-verifier/OpenId4VcSiopVerifierServiceOptions.js +0 -3
- package/build/openid4vc-verifier/OpenId4VcSiopVerifierServiceOptions.js.map +0 -1
- package/build/openid4vc-verifier/OpenId4VcVerificationSessionState.d.ts +0 -6
- package/build/openid4vc-verifier/OpenId4VcVerificationSessionState.js +0 -11
- package/build/openid4vc-verifier/OpenId4VcVerificationSessionState.js.map +0 -1
- package/build/openid4vc-verifier/OpenId4VcVerifierApi.d.ts +0 -61
- package/build/openid4vc-verifier/OpenId4VcVerifierApi.js +0 -108
- package/build/openid4vc-verifier/OpenId4VcVerifierApi.js.map +0 -1
- package/build/openid4vc-verifier/OpenId4VcVerifierEvents.d.ts +0 -13
- package/build/openid4vc-verifier/OpenId4VcVerifierEvents.js +0 -8
- package/build/openid4vc-verifier/OpenId4VcVerifierEvents.js.map +0 -1
- package/build/openid4vc-verifier/OpenId4VcVerifierModule.d.ts +0 -21
- package/build/openid4vc-verifier/OpenId4VcVerifierModule.js +0 -109
- package/build/openid4vc-verifier/OpenId4VcVerifierModule.js.map +0 -1
- package/build/openid4vc-verifier/OpenId4VcVerifierModuleConfig.d.ts +0 -31
- package/build/openid4vc-verifier/OpenId4VcVerifierModuleConfig.js +0 -28
- package/build/openid4vc-verifier/OpenId4VcVerifierModuleConfig.js.map +0 -1
- package/build/openid4vc-verifier/index.d.ts +0 -8
- package/build/openid4vc-verifier/index.js +0 -25
- package/build/openid4vc-verifier/index.js.map +0 -1
- package/build/openid4vc-verifier/repository/OpenId4VcRelyingPartyEventEmitter.d.ts +0 -49
- package/build/openid4vc-verifier/repository/OpenId4VcRelyingPartyEventEmitter.js +0 -234
- package/build/openid4vc-verifier/repository/OpenId4VcRelyingPartyEventEmitter.js.map +0 -1
- package/build/openid4vc-verifier/repository/OpenId4VcRelyingPartySessionManager.d.ts +0 -19
- package/build/openid4vc-verifier/repository/OpenId4VcRelyingPartySessionManager.js +0 -146
- package/build/openid4vc-verifier/repository/OpenId4VcRelyingPartySessionManager.js.map +0 -1
- package/build/openid4vc-verifier/repository/OpenId4VcVerificationSessionRecord.d.ts +0 -71
- package/build/openid4vc-verifier/repository/OpenId4VcVerificationSessionRecord.js +0 -46
- package/build/openid4vc-verifier/repository/OpenId4VcVerificationSessionRecord.js.map +0 -1
- package/build/openid4vc-verifier/repository/OpenId4VcVerificationSessionRepository.d.ts +0 -5
- package/build/openid4vc-verifier/repository/OpenId4VcVerificationSessionRepository.js +0 -29
- package/build/openid4vc-verifier/repository/OpenId4VcVerificationSessionRepository.js.map +0 -1
- package/build/openid4vc-verifier/repository/OpenId4VcVerifierRecord.d.ts +0 -29
- package/build/openid4vc-verifier/repository/OpenId4VcVerifierRecord.js +0 -29
- package/build/openid4vc-verifier/repository/OpenId4VcVerifierRecord.js.map +0 -1
- package/build/openid4vc-verifier/repository/OpenId4VcVerifierRepository.d.ts +0 -8
- package/build/openid4vc-verifier/repository/OpenId4VcVerifierRepository.js +0 -35
- package/build/openid4vc-verifier/repository/OpenId4VcVerifierRepository.js.map +0 -1
- package/build/openid4vc-verifier/repository/index.d.ts +0 -4
- package/build/openid4vc-verifier/repository/index.js +0 -21
- package/build/openid4vc-verifier/repository/index.js.map +0 -1
- package/build/openid4vc-verifier/router/authorizationEndpoint.d.ts +0 -11
- package/build/openid4vc-verifier/router/authorizationEndpoint.js +0 -102
- package/build/openid4vc-verifier/router/authorizationEndpoint.js.map +0 -1
- package/build/openid4vc-verifier/router/authorizationRequestEndpoint.d.ts +0 -11
- package/build/openid4vc-verifier/router/authorizationRequestEndpoint.js +0 -63
- package/build/openid4vc-verifier/router/authorizationRequestEndpoint.js.map +0 -1
- package/build/openid4vc-verifier/router/index.d.ts +0 -2
- package/build/openid4vc-verifier/router/index.js +0 -6
- package/build/openid4vc-verifier/router/index.js.map +0 -1
- package/build/openid4vc-verifier/router/requestContext.d.ts +0 -5
- package/build/openid4vc-verifier/router/requestContext.js +0 -3
- package/build/openid4vc-verifier/router/requestContext.js.map +0 -1
- package/build/shared/callbacks.d.ts +0 -18
- package/build/shared/callbacks.js +0 -81
- package/build/shared/callbacks.js.map +0 -1
- package/build/shared/index.d.ts +0 -2
- package/build/shared/index.js +0 -19
- package/build/shared/index.js.map +0 -1
- package/build/shared/issuerMetadataUtils.d.ts +0 -158
- package/build/shared/issuerMetadataUtils.js +0 -38
- package/build/shared/issuerMetadataUtils.js.map +0 -1
- package/build/shared/models/CredentialHolderBinding.d.ts +0 -13
- package/build/shared/models/CredentialHolderBinding.js +0 -3
- package/build/shared/models/CredentialHolderBinding.js.map +0 -1
- package/build/shared/models/OpenId4VcJwtIssuer.d.ts +0 -28
- package/build/shared/models/OpenId4VcJwtIssuer.js +0 -3
- package/build/shared/models/OpenId4VcJwtIssuer.js.map +0 -1
- package/build/shared/models/OpenId4VciAuthorizationServerConfig.d.ts +0 -10
- package/build/shared/models/OpenId4VciAuthorizationServerConfig.js +0 -3
- package/build/shared/models/OpenId4VciAuthorizationServerConfig.js.map +0 -1
- package/build/shared/models/OpenId4VciCredentialFormatProfile.d.ts +0 -7
- package/build/shared/models/OpenId4VciCredentialFormatProfile.js +0 -12
- package/build/shared/models/OpenId4VciCredentialFormatProfile.js.map +0 -1
- package/build/shared/models/index.d.ts +0 -24
- package/build/shared/models/index.js +0 -25
- package/build/shared/models/index.js.map +0 -1
- package/build/shared/router/context.d.ts +0 -17
- package/build/shared/router/context.js +0 -76
- package/build/shared/router/context.js.map +0 -1
- package/build/shared/router/express.d.ts +0 -2
- package/build/shared/router/express.js +0 -15
- package/build/shared/router/express.js.map +0 -1
- package/build/shared/router/express.native.d.ts +0 -1
- package/build/shared/router/express.native.js +0 -7
- package/build/shared/router/express.native.js.map +0 -1
- package/build/shared/router/index.d.ts +0 -3
- package/build/shared/router/index.js +0 -20
- package/build/shared/router/index.js.map +0 -1
- package/build/shared/router/tenants.d.ts +0 -13
- package/build/shared/router/tenants.js +0 -49
- package/build/shared/router/tenants.js.map +0 -1
- package/build/shared/transform.d.ts +0 -5
- package/build/shared/transform.js +0 -73
- package/build/shared/transform.js.map +0 -1
- package/build/shared/utils.d.ts +0 -22
- package/build/shared/utils.js +0 -154
- package/build/shared/utils.js.map +0 -1
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
import type { OpenId4VciCredentialConfigurationsSupported, OpenId4VciCredentialConfigurationsSupportedWithFormats } from './models';
|
|
2
|
-
import { type CredentialConfigurationsSupported } from '@animo-id/oid4vci';
|
|
3
|
-
/**
|
|
4
|
-
* Returns all entries from the credential offer with the associated metadata resolved.
|
|
5
|
-
*/
|
|
6
|
-
export declare function getOfferedCredentials<Configurations extends OpenId4VciCredentialConfigurationsSupported | OpenId4VciCredentialConfigurationsSupportedWithFormats>(offeredCredentialConfigurationIds: Array<string>, credentialConfigurationsSupported: Configurations, { ignoreNotFoundIds }?: {
|
|
7
|
-
ignoreNotFoundIds?: boolean;
|
|
8
|
-
}): Configurations extends OpenId4VciCredentialConfigurationsSupportedWithFormats ? OpenId4VciCredentialConfigurationsSupportedWithFormats : OpenId4VciCredentialConfigurationsSupported;
|
|
9
|
-
export declare function getScopesFromCredentialConfigurationsSupported(credentialConfigurationsSupported: CredentialConfigurationsSupported): string[];
|
|
10
|
-
export declare function getAllowedAndRequestedScopeValues(options: {
|
|
11
|
-
requestedScope: string;
|
|
12
|
-
allowedScopes: string[];
|
|
13
|
-
}): string[];
|
|
14
|
-
export declare function getCredentialConfigurationsSupportedForScopes(credentialConfigurationsSupported: CredentialConfigurationsSupported, scopes: string[]): {
|
|
15
|
-
[k: string]: ({
|
|
16
|
-
format: "vc+sd-jwt";
|
|
17
|
-
vct: string;
|
|
18
|
-
claims?: ({
|
|
19
|
-
mandatory?: boolean | undefined;
|
|
20
|
-
value_type?: string | undefined;
|
|
21
|
-
display?: ({
|
|
22
|
-
name?: string | undefined;
|
|
23
|
-
locale?: string | undefined;
|
|
24
|
-
} & {
|
|
25
|
-
[key: string]: unknown;
|
|
26
|
-
}) | undefined;
|
|
27
|
-
} & {
|
|
28
|
-
[key: string]: unknown;
|
|
29
|
-
}) | undefined;
|
|
30
|
-
order?: string[] | undefined;
|
|
31
|
-
} | {
|
|
32
|
-
format: "mso_mdoc";
|
|
33
|
-
doctype: string;
|
|
34
|
-
claims?: ({
|
|
35
|
-
mandatory?: boolean | undefined;
|
|
36
|
-
value_type?: string | undefined;
|
|
37
|
-
display?: ({
|
|
38
|
-
name?: string | undefined;
|
|
39
|
-
locale?: string | undefined;
|
|
40
|
-
} & {
|
|
41
|
-
[key: string]: unknown;
|
|
42
|
-
}) | undefined;
|
|
43
|
-
} & {
|
|
44
|
-
[key: string]: unknown;
|
|
45
|
-
}) | undefined;
|
|
46
|
-
order?: string[] | undefined;
|
|
47
|
-
} | {
|
|
48
|
-
format: "jwt_vc_json-ld";
|
|
49
|
-
credential_definition: {
|
|
50
|
-
type: string[];
|
|
51
|
-
'@context': string[];
|
|
52
|
-
credentialSubject?: {
|
|
53
|
-
[x: string]: any[] | {
|
|
54
|
-
[x: string]: any;
|
|
55
|
-
} | ({
|
|
56
|
-
mandatory: boolean;
|
|
57
|
-
value_type?: string | undefined;
|
|
58
|
-
display?: ({
|
|
59
|
-
name?: string | undefined;
|
|
60
|
-
locale?: string | undefined;
|
|
61
|
-
} & {
|
|
62
|
-
[key: string]: unknown;
|
|
63
|
-
})[] | undefined;
|
|
64
|
-
} & {
|
|
65
|
-
[key: string]: unknown;
|
|
66
|
-
});
|
|
67
|
-
} | undefined;
|
|
68
|
-
} & {
|
|
69
|
-
[key: string]: unknown;
|
|
70
|
-
};
|
|
71
|
-
order?: string[] | undefined;
|
|
72
|
-
} | {
|
|
73
|
-
format: "ldp_vc";
|
|
74
|
-
credential_definition: {
|
|
75
|
-
type: string[];
|
|
76
|
-
'@context': string[];
|
|
77
|
-
credentialSubject?: {
|
|
78
|
-
[x: string]: any[] | {
|
|
79
|
-
[x: string]: any;
|
|
80
|
-
} | ({
|
|
81
|
-
mandatory: boolean;
|
|
82
|
-
value_type?: string | undefined;
|
|
83
|
-
display?: ({
|
|
84
|
-
name?: string | undefined;
|
|
85
|
-
locale?: string | undefined;
|
|
86
|
-
} & {
|
|
87
|
-
[key: string]: unknown;
|
|
88
|
-
})[] | undefined;
|
|
89
|
-
} & {
|
|
90
|
-
[key: string]: unknown;
|
|
91
|
-
});
|
|
92
|
-
} | undefined;
|
|
93
|
-
} & {
|
|
94
|
-
[key: string]: unknown;
|
|
95
|
-
};
|
|
96
|
-
order?: string[] | undefined;
|
|
97
|
-
} | {
|
|
98
|
-
format: "jwt_vc_json";
|
|
99
|
-
credential_definition: {
|
|
100
|
-
type: string[];
|
|
101
|
-
credentialSubject?: {
|
|
102
|
-
[x: string]: any[] | {
|
|
103
|
-
[x: string]: any;
|
|
104
|
-
} | ({
|
|
105
|
-
mandatory: boolean;
|
|
106
|
-
value_type?: string | undefined;
|
|
107
|
-
display?: ({
|
|
108
|
-
name?: string | undefined;
|
|
109
|
-
locale?: string | undefined;
|
|
110
|
-
} & {
|
|
111
|
-
[key: string]: unknown;
|
|
112
|
-
})[] | undefined;
|
|
113
|
-
} & {
|
|
114
|
-
[key: string]: unknown;
|
|
115
|
-
});
|
|
116
|
-
} | undefined;
|
|
117
|
-
} & {
|
|
118
|
-
[key: string]: unknown;
|
|
119
|
-
};
|
|
120
|
-
order?: string[] | undefined;
|
|
121
|
-
} | ({
|
|
122
|
-
format: string;
|
|
123
|
-
} & {
|
|
124
|
-
[key: string]: unknown;
|
|
125
|
-
})) & {
|
|
126
|
-
format: string;
|
|
127
|
-
display?: ({
|
|
128
|
-
name: string;
|
|
129
|
-
description?: string | undefined;
|
|
130
|
-
locale?: string | undefined;
|
|
131
|
-
logo?: ({
|
|
132
|
-
uri?: string | undefined;
|
|
133
|
-
alt_text?: string | undefined;
|
|
134
|
-
} & {
|
|
135
|
-
[key: string]: unknown;
|
|
136
|
-
}) | undefined;
|
|
137
|
-
background_color?: string | undefined;
|
|
138
|
-
background_image?: ({
|
|
139
|
-
uri?: string | undefined;
|
|
140
|
-
} & {
|
|
141
|
-
[key: string]: unknown;
|
|
142
|
-
}) | undefined;
|
|
143
|
-
text_color?: string | undefined;
|
|
144
|
-
} & {
|
|
145
|
-
[key: string]: unknown;
|
|
146
|
-
})[] | undefined;
|
|
147
|
-
scope?: string | undefined;
|
|
148
|
-
cryptographic_binding_methods_supported?: string[] | undefined;
|
|
149
|
-
credential_signing_alg_values_supported?: string[] | undefined;
|
|
150
|
-
proof_types_supported?: {
|
|
151
|
-
[x: string]: {
|
|
152
|
-
proof_signing_alg_values_supported: string[];
|
|
153
|
-
};
|
|
154
|
-
} | undefined;
|
|
155
|
-
} & {
|
|
156
|
-
[key: string]: unknown;
|
|
157
|
-
};
|
|
158
|
-
};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getOfferedCredentials = getOfferedCredentials;
|
|
4
|
-
exports.getScopesFromCredentialConfigurationsSupported = getScopesFromCredentialConfigurationsSupported;
|
|
5
|
-
exports.getAllowedAndRequestedScopeValues = getAllowedAndRequestedScopeValues;
|
|
6
|
-
exports.getCredentialConfigurationsSupportedForScopes = getCredentialConfigurationsSupportedForScopes;
|
|
7
|
-
/**
|
|
8
|
-
* Returns all entries from the credential offer with the associated metadata resolved.
|
|
9
|
-
*/
|
|
10
|
-
function getOfferedCredentials(offeredCredentialConfigurationIds, credentialConfigurationsSupported, { ignoreNotFoundIds = false } = {}) {
|
|
11
|
-
const offeredCredentialConfigurations = {};
|
|
12
|
-
for (const offeredCredentialConfigurationId of offeredCredentialConfigurationIds) {
|
|
13
|
-
const foundCredentialConfiguration = credentialConfigurationsSupported[offeredCredentialConfigurationId];
|
|
14
|
-
// Make sure the issuer metadata includes the offered credential.
|
|
15
|
-
if (!foundCredentialConfiguration) {
|
|
16
|
-
if (!ignoreNotFoundIds) {
|
|
17
|
-
throw new Error(`Offered credential configuration id '${offeredCredentialConfigurationId}' is not part of credential_configurations_supported of the issuer metadata.`);
|
|
18
|
-
}
|
|
19
|
-
continue;
|
|
20
|
-
}
|
|
21
|
-
offeredCredentialConfigurations[offeredCredentialConfigurationId] = foundCredentialConfiguration;
|
|
22
|
-
}
|
|
23
|
-
return offeredCredentialConfigurations;
|
|
24
|
-
}
|
|
25
|
-
function getScopesFromCredentialConfigurationsSupported(credentialConfigurationsSupported) {
|
|
26
|
-
return Array.from(new Set(Object.values(credentialConfigurationsSupported)
|
|
27
|
-
.map((configuration) => configuration.scope)
|
|
28
|
-
.filter((scope) => scope !== undefined)));
|
|
29
|
-
}
|
|
30
|
-
function getAllowedAndRequestedScopeValues(options) {
|
|
31
|
-
const requestedScopeValues = options.requestedScope.split(' ');
|
|
32
|
-
const allowedAndRequestedScopeValues = options.allowedScopes.filter((allowedScope) => requestedScopeValues.includes(allowedScope));
|
|
33
|
-
return allowedAndRequestedScopeValues;
|
|
34
|
-
}
|
|
35
|
-
function getCredentialConfigurationsSupportedForScopes(credentialConfigurationsSupported, scopes) {
|
|
36
|
-
return Object.fromEntries(Object.entries(credentialConfigurationsSupported).filter(([, configuration]) => configuration.scope && scopes.includes(configuration.scope)));
|
|
37
|
-
}
|
|
38
|
-
//# sourceMappingURL=issuerMetadataUtils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"issuerMetadataUtils.js","sourceRoot":"","sources":["../../src/shared/issuerMetadataUtils.ts"],"names":[],"mappings":";;AAUA,sDAgCC;AAED,wGAUC;AAED,8EAOC;AAED,sGASC;AAnED;;GAEG;AACH,SAAgB,qBAAqB,CAKnC,iCAAgD,EAChD,iCAAiD,EACjD,EAAE,iBAAiB,GAAG,KAAK,KAAsC,EAAE;IAInE,MAAM,+BAA+B,GAAgD,EAAE,CAAA;IACvF,KAAK,MA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Q,CAAC,aAAa,CAAC,KAAK,CAAC,CACnF,CACF,CAAA;AACH,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { Jwk, Key } from '@credo-ts/core';
|
|
2
|
-
export type OpenId4VcCredentialHolderDidBinding = {
|
|
3
|
-
method: 'did';
|
|
4
|
-
didUrl: string;
|
|
5
|
-
};
|
|
6
|
-
export type OpenId4VcCredentialHolderJwkBinding = {
|
|
7
|
-
method: 'jwk';
|
|
8
|
-
jwk: Jwk;
|
|
9
|
-
};
|
|
10
|
-
export type OpenId4VcCredentialHolderBinding = OpenId4VcCredentialHolderDidBinding | OpenId4VcCredentialHolderJwkBinding;
|
|
11
|
-
export type OpenId4VcCredentialHolderBindingWithKey = OpenId4VcCredentialHolderBinding & {
|
|
12
|
-
key: Key;
|
|
13
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CredentialHolderBinding.js","sourceRoot":"","sources":["../../../src/shared/models/CredentialHolderBinding.ts"],"names":[],"mappings":""}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { Jwk } from '@credo-ts/core';
|
|
2
|
-
interface OpenId4VcJwtIssuerDid {
|
|
3
|
-
method: 'did';
|
|
4
|
-
didUrl: string;
|
|
5
|
-
}
|
|
6
|
-
export interface OpenId4VcIssuerX5c {
|
|
7
|
-
method: 'x5c';
|
|
8
|
-
/**
|
|
9
|
-
*
|
|
10
|
-
* Array of base64-encoded certificate strings in the DER-format.
|
|
11
|
-
*
|
|
12
|
-
* The certificate containing the public key corresponding to the key used to digitally sign the JWS MUST be the first certificate.
|
|
13
|
-
*/
|
|
14
|
-
x5c: string[];
|
|
15
|
-
/**
|
|
16
|
-
* The issuer of the JWT. Should be a HTTPS URI.
|
|
17
|
-
*
|
|
18
|
-
* The issuer value must either match a `uniformResourceIdentifier` SAN entry of the leaf entity certificate
|
|
19
|
-
* or the domain name in the `iss` value matches a `dNSName` SAN entry of the leaf-entity certificate.
|
|
20
|
-
*/
|
|
21
|
-
issuer: string;
|
|
22
|
-
}
|
|
23
|
-
interface OpenId4VcJwtIssuerJwk {
|
|
24
|
-
method: 'jwk';
|
|
25
|
-
jwk: Jwk;
|
|
26
|
-
}
|
|
27
|
-
export type OpenId4VcJwtIssuer = OpenId4VcJwtIssuerDid | OpenId4VcIssuerX5c | OpenId4VcJwtIssuerJwk;
|
|
28
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OpenId4VcJwtIssuer.js","sourceRoot":"","sources":["../../../src/shared/models/OpenId4VcJwtIssuer.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OpenId4VciAuthorizationServerConfig.js","sourceRoot":"","sources":["../../../src/shared/models/OpenId4VciAuthorizationServerConfig.ts"],"names":[],"mappings":""}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OpenId4VciCredentialFormatProfile = void 0;
|
|
4
|
-
var OpenId4VciCredentialFormatProfile;
|
|
5
|
-
(function (OpenId4VciCredentialFormatProfile) {
|
|
6
|
-
OpenId4VciCredentialFormatProfile["JwtVcJson"] = "jwt_vc_json";
|
|
7
|
-
OpenId4VciCredentialFormatProfile["JwtVcJsonLd"] = "jwt_vc_json-ld";
|
|
8
|
-
OpenId4VciCredentialFormatProfile["LdpVc"] = "ldp_vc";
|
|
9
|
-
OpenId4VciCredentialFormatProfile["SdJwtVc"] = "vc+sd-jwt";
|
|
10
|
-
OpenId4VciCredentialFormatProfile["MsoMdoc"] = "mso_mdoc";
|
|
11
|
-
})(OpenId4VciCredentialFormatProfile || (exports.OpenId4VciCredentialFormatProfile = OpenId4VciCredentialFormatProfile = {}));
|
|
12
|
-
//# sourceMappingURL=OpenId4VciCredentialFormatProfile.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OpenId4VciCredentialFormatProfile.js","sourceRoot":"","sources":["../../../src/shared/models/OpenId4VciCredentialFormatProfile.ts"],"names":[],"mappings":";;;AAAA,IAAY,iCAMX;AAND,WAAY,iCAAiC;IAC3C,8DAAyB,CAAA;IACzB,mEAA8B,CAAA;IAC9B,qDAAgB,CAAA;IAChB,0DAAqB,CAAA;IACrB,yDAAoB,CAAA;AACtB,CAAC,EANW,iCAAiC,iDAAjC,iCAAiC,QAM5C"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { CredentialConfigurationSupported, CredentialConfigurationSupportedWithFormats, CredentialIssuerMetadata, CredentialIssuerMetadataDisplayEntry, CredentialOfferPreAuthorizedCodeGrantTxCode, CredentialRequest, CredentialRequestFormatSpecific, CredentialRequestWithFormats, IssuerMetadataResult, ParseCredentialRequestReturn, CredentialOfferObject } from '@animo-id/oid4vci';
|
|
2
|
-
import type { VerifiedAuthorizationRequest, AuthorizationRequestPayload, AuthorizationResponsePayload, IDTokenPayload } from '@sphereon/did-auth-siop';
|
|
3
|
-
export { preAuthorizedCodeGrantIdentifier, authorizationCodeGrantIdentifier } from '@animo-id/oauth2';
|
|
4
|
-
export type OpenId4VciCredentialConfigurationSupportedWithFormats = CredentialConfigurationSupportedWithFormats;
|
|
5
|
-
export type OpenId4VciCredentialConfigurationSupported = CredentialConfigurationSupported;
|
|
6
|
-
export type OpenId4VciCredentialConfigurationsSupported = Record<string, OpenId4VciCredentialConfigurationSupported>;
|
|
7
|
-
export type OpenId4VciCredentialConfigurationsSupportedWithFormats = Record<string, OpenId4VciCredentialConfigurationSupportedWithFormats>;
|
|
8
|
-
export type OpenId4VciMetadata = IssuerMetadataResult;
|
|
9
|
-
export type OpenId4VciTxCode = CredentialOfferPreAuthorizedCodeGrantTxCode;
|
|
10
|
-
export type OpenId4VciCredentialIssuerMetadata = CredentialIssuerMetadata;
|
|
11
|
-
export type OpenId4VciParsedCredentialRequest = ParseCredentialRequestReturn;
|
|
12
|
-
export type OpenId4VciCredentialRequestFormatSpecific = CredentialRequestFormatSpecific;
|
|
13
|
-
export type OpenId4VciCredentialIssuerMetadataDisplay = CredentialIssuerMetadataDisplayEntry;
|
|
14
|
-
export type OpenId4VciCredentialRequest = CredentialRequest;
|
|
15
|
-
export type OpenId4VciCredentialRequestWithFormats = CredentialRequestWithFormats;
|
|
16
|
-
export type OpenId4VciCredentialOfferPayload = CredentialOfferObject;
|
|
17
|
-
export type OpenId4VcSiopVerifiedAuthorizationRequest = VerifiedAuthorizationRequest;
|
|
18
|
-
export type OpenId4VcSiopAuthorizationRequestPayload = AuthorizationRequestPayload;
|
|
19
|
-
export type OpenId4VcSiopAuthorizationResponsePayload = AuthorizationResponsePayload;
|
|
20
|
-
export type OpenId4VcSiopIdTokenPayload = IDTokenPayload;
|
|
21
|
-
export * from './OpenId4VcJwtIssuer';
|
|
22
|
-
export * from './CredentialHolderBinding';
|
|
23
|
-
export * from './OpenId4VciCredentialFormatProfile';
|
|
24
|
-
export * from './OpenId4VciAuthorizationServerConfig';
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.authorizationCodeGrantIdentifier = exports.preAuthorizedCodeGrantIdentifier = void 0;
|
|
18
|
-
var oauth2_1 = require("@animo-id/oauth2");
|
|
19
|
-
Object.defineProperty(exports, "preAuthorizedCodeGrantIdentifier", { enumerable: true, get: function () { return oauth2_1.preAuthorizedCodeGrantIdentifier; } });
|
|
20
|
-
Object.defineProperty(exports, "authorizationCodeGrantIdentifier", { enumerable: true, get: function () { return oauth2_1.authorizationCodeGrantIdentifier; } });
|
|
21
|
-
__exportStar(require("./OpenId4VcJwtIssuer"), exports);
|
|
22
|
-
__exportStar(require("./CredentialHolderBinding"), exports);
|
|
23
|
-
__exportStar(require("./OpenId4VciCredentialFormatProfile"), exports);
|
|
24
|
-
__exportStar(require("./OpenId4VciAuthorizationServerConfig"), exports);
|
|
25
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/shared/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAoBA,2CAAqG;AAA5F,0HAAA,gCAAgC,OAAA;AAAE,0HAAA,gCAAgC,OAAA;AA+B3E,uDAAoC;AACpC,4DAAyC;AACzC,sEAAmD;AACnD,wEAAqD"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { Oauth2ErrorCodes, Oauth2ServerErrorResponseError } from '@animo-id/oauth2';
|
|
2
|
-
import type { AgentContext, Logger } from '@credo-ts/core';
|
|
3
|
-
import type { Response, Request, NextFunction } from 'express';
|
|
4
|
-
import { Oauth2ResourceUnauthorizedError } from '@animo-id/oauth2';
|
|
5
|
-
export interface OpenId4VcRequest<RC extends Record<string, unknown> = Record<string, never>> extends Request {
|
|
6
|
-
requestContext?: RC & OpenId4VcRequestContext;
|
|
7
|
-
}
|
|
8
|
-
export interface OpenId4VcRequestContext {
|
|
9
|
-
agentContext: AgentContext;
|
|
10
|
-
}
|
|
11
|
-
export declare function sendUnauthorizedError(response: Response, next: NextFunction, logger: Logger, error: unknown | Oauth2ResourceUnauthorizedError, status?: number): void;
|
|
12
|
-
export declare function sendOauth2ErrorResponse(response: Response, next: NextFunction, logger: Logger, error: Oauth2ServerErrorResponseError): void;
|
|
13
|
-
export declare function sendUnknownServerErrorResponse(response: Response, next: NextFunction, logger: Logger, error: unknown): void;
|
|
14
|
-
export declare function sendNotFoundResponse(response: Response, next: NextFunction, logger: Logger, internalReason: string): void;
|
|
15
|
-
export declare function sendErrorResponse(response: Response, next: NextFunction, logger: Logger, status: number, message: Oauth2ErrorCodes | string, error: unknown, additionalPayload?: Record<string, unknown>): void;
|
|
16
|
-
export declare function sendJsonResponse(response: Response, next: NextFunction, body: any, contentType?: string, status?: number): void;
|
|
17
|
-
export declare function getRequestContext<T extends OpenId4VcRequest<any>>(request: T): NonNullable<T['requestContext']>;
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.sendUnauthorizedError = sendUnauthorizedError;
|
|
4
|
-
exports.sendOauth2ErrorResponse = sendOauth2ErrorResponse;
|
|
5
|
-
exports.sendUnknownServerErrorResponse = sendUnknownServerErrorResponse;
|
|
6
|
-
exports.sendNotFoundResponse = sendNotFoundResponse;
|
|
7
|
-
exports.sendErrorResponse = sendErrorResponse;
|
|
8
|
-
exports.sendJsonResponse = sendJsonResponse;
|
|
9
|
-
exports.getRequestContext = getRequestContext;
|
|
10
|
-
const oauth2_1 = require("@animo-id/oauth2");
|
|
11
|
-
const core_1 = require("@credo-ts/core");
|
|
12
|
-
function sendUnauthorizedError(response, next, logger, error, status) {
|
|
13
|
-
const errorMessage = error instanceof Error ? error.message : error;
|
|
14
|
-
logger.warn(`[OID4VC] Sending authorization error response: ${JSON.stringify(errorMessage)}`, {
|
|
15
|
-
error,
|
|
16
|
-
});
|
|
17
|
-
const unauhorizedError = error instanceof oauth2_1.Oauth2ResourceUnauthorizedError
|
|
18
|
-
? error
|
|
19
|
-
: new oauth2_1.Oauth2ResourceUnauthorizedError('Unknown error occured', [
|
|
20
|
-
{ scheme: oauth2_1.SupportedAuthenticationScheme.DPoP },
|
|
21
|
-
{ scheme: oauth2_1.SupportedAuthenticationScheme.Bearer },
|
|
22
|
-
]);
|
|
23
|
-
response
|
|
24
|
-
.setHeader('WWW-Authenticate', unauhorizedError.toHeaderValue())
|
|
25
|
-
.status(status !== null && status !== void 0 ? status : 403)
|
|
26
|
-
.send();
|
|
27
|
-
next(error);
|
|
28
|
-
}
|
|
29
|
-
function sendOauth2ErrorResponse(response, next, logger, error) {
|
|
30
|
-
logger.warn(`[OID4VC] Sending oauth2 error response: ${JSON.stringify(error.message)}`, {
|
|
31
|
-
error,
|
|
32
|
-
});
|
|
33
|
-
response.status(error.status).json(error.errorResponse);
|
|
34
|
-
next(error);
|
|
35
|
-
}
|
|
36
|
-
function sendUnknownServerErrorResponse(response, next, logger, error) {
|
|
37
|
-
logger.error(`[OID4VC] Sending unknown server error response`, {
|
|
38
|
-
error,
|
|
39
|
-
});
|
|
40
|
-
response.status(500).json({
|
|
41
|
-
error: 'server_error',
|
|
42
|
-
});
|
|
43
|
-
const throwError = error instanceof Error ? error : new core_1.CredoError('Unknown error in openid4vc error response handler');
|
|
44
|
-
next(throwError);
|
|
45
|
-
}
|
|
46
|
-
function sendNotFoundResponse(response, next, logger, internalReason) {
|
|
47
|
-
logger.debug(`[OID4VC] Sending not found response: ${internalReason}`);
|
|
48
|
-
response.status(404).send();
|
|
49
|
-
next(new core_1.CredoError(internalReason));
|
|
50
|
-
}
|
|
51
|
-
function sendErrorResponse(response, next, logger, status, message, error, additionalPayload) {
|
|
52
|
-
const body = Object.assign({ error: message }, additionalPayload);
|
|
53
|
-
logger.warn(`[OID4VC] Sending error response: ${JSON.stringify(body)}`, {
|
|
54
|
-
error,
|
|
55
|
-
});
|
|
56
|
-
response.status(status).json(body);
|
|
57
|
-
const throwError = error instanceof Error ? error : new core_1.CredoError('Unknown error in openid4vc error response handler');
|
|
58
|
-
next(throwError);
|
|
59
|
-
}
|
|
60
|
-
function sendJsonResponse(response, next,
|
|
61
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
62
|
-
body, contentType, status) {
|
|
63
|
-
response
|
|
64
|
-
.setHeader('Content-Type', contentType !== null && contentType !== void 0 ? contentType : 'application/json')
|
|
65
|
-
.status(status !== null && status !== void 0 ? status : 200)
|
|
66
|
-
.send(JSON.stringify(body));
|
|
67
|
-
next();
|
|
68
|
-
}
|
|
69
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
70
|
-
function getRequestContext(request) {
|
|
71
|
-
const requestContext = request.requestContext;
|
|
72
|
-
if (!requestContext)
|
|
73
|
-
throw new core_1.CredoError('Request context not set.');
|
|
74
|
-
return requestContext;
|
|
75
|
-
}
|
|
76
|
-
//# sourceMappingURL=context.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/shared/router/context.ts"],"names":[],"mappings":";;AAeA,sDAyBC;AAED,0DAYC;AACD,wEAYC;AAED,oDAKC;AAED,8CAmBC;AAED,4CAcC;AAGD,8CAKC;AAnHD,6CAAiG;AACjG,yCAA2C;AAU3C,SAAgB,qBAAqB,CACnC,QAAkB,EAClB,IAAkB,EAClB,MAAc,EACd,KAAgD,EAChD,MAAe;IAEf,MAAM,YAAY,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAA;IACnE,MAAM,CAAC,IAAI,CAAC,kDAAkD,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,EAAE,EAAE;QAC5F,KAAK;KACN,CAAC,CAAA;IAEF,MAAM,gBAAgB,GACpB,KAAK,YAAY,wCAA+B;QAC9C,CAAC,CAAC,KAAK;QACP,CAAC,CAAC,IAAI,wCAA+B,CAAC,uBAAuB,EAAE;YAC3D,EAAE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cAAc,CAAA;AACvB,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.importExpress = importExpress;
|
|
4
|
-
function importExpress() {
|
|
5
|
-
try {
|
|
6
|
-
// NOTE: 'express' is added as a peer-dependency, and is required when using this module
|
|
7
|
-
// eslint-disable-next-line import/no-extraneous-dependencies, @typescript-eslint/no-var-requires
|
|
8
|
-
const express = require('express');
|
|
9
|
-
return express;
|
|
10
|
-
}
|
|
11
|
-
catch (error) {
|
|
12
|
-
throw new Error('Express must be installed as a peer dependency');
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=express.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"express.js","sourceRoot":"","sources":["../../../src/shared/router/express.ts"],"names":[],"mappings":";;AAEA,sCASC;AATD,SAAgB,aAAa;IAC3B,IAAI,CAAC;QACH,wFAAwF;QACxF,iGAAiG;QACjG,MAAM,OAAO,GAAG,OAAO,CAAC,SAAS,CAAmB,CAAA;QACpD,OAAO,OAAO,CAAA;IAChB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAA;IACnE,CAAC;AACH,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function importExpress(): void;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.importExpress = importExpress;
|
|
4
|
-
function importExpress() {
|
|
5
|
-
throw new Error("Express cannot be imported in React Native. This is probably because you are trying to use the 'OpenId4VcIssuerModule' or the 'OpenId4VcVerifierModule'.");
|
|
6
|
-
}
|
|
7
|
-
//# sourceMappingURL=express.native.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"express.native.js","sourceRoot":"","sources":["../../../src/shared/router/express.native.ts"],"names":[],"mappings":";;AAAA,sCAIC;AAJD,SAAgB,aAAa;IAC3B,MAAM,IAAI,KAAK,CACb,0JAA0J,CAC3J,CAAA;AACH,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./express"), exports);
|
|
18
|
-
__exportStar(require("./context"), exports);
|
|
19
|
-
__exportStar(require("./tenants"), exports);
|
|
20
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/shared/router/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAAyB;AACzB,4CAAyB;AACzB,4CAAyB"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { AgentContext } from '@credo-ts/core';
|
|
2
|
-
export declare function getAgentContextForActorId(rootAgentContext: AgentContext, actorId: string): Promise<AgentContext>;
|
|
3
|
-
/**
|
|
4
|
-
* Store the actor id associated with a context correlation id. If multi-tenancy is not used
|
|
5
|
-
* this method won't do anything as we can just use the actor from the default context. However
|
|
6
|
-
* if multi-tenancy is used, we will store the actor id in the tenant record metadata so it can
|
|
7
|
-
* be queried when a request comes in for the specific actor id.
|
|
8
|
-
*
|
|
9
|
-
* The reason for doing this is that we don't want to expose the context correlation id in the
|
|
10
|
-
* actor metadata url, as it is then possible to see exactly which actors are registered under
|
|
11
|
-
* the same agent.
|
|
12
|
-
*/
|
|
13
|
-
export declare function storeActorIdForContextCorrelationId(agentContext: AgentContext, actorId: string): Promise<void>;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getAgentContextForActorId = getAgentContextForActorId;
|
|
4
|
-
exports.storeActorIdForContextCorrelationId = storeActorIdForContextCorrelationId;
|
|
5
|
-
const core_1 = require("@credo-ts/core");
|
|
6
|
-
const OPENID4VC_ACTOR_IDS_METADATA_KEY = '_openid4vc/openId4VcActorIds';
|
|
7
|
-
async function getAgentContextForActorId(rootAgentContext, actorId) {
|
|
8
|
-
// Check if multi-tenancy is enabled, and if so find the associated multi-tenant record
|
|
9
|
-
// This is a bit hacky as it uses the tenants module to store the openid4vc actor id
|
|
10
|
-
// but this way we don't have to expose the contextCorrelationId in the openid metadata
|
|
11
|
-
const tenantsApi = (0, core_1.getApiForModuleByName)(rootAgentContext, 'TenantsModule');
|
|
12
|
-
if (tenantsApi) {
|
|
13
|
-
const [tenant] = await tenantsApi.findTenantsByQuery({
|
|
14
|
-
[OPENID4VC_ACTOR_IDS_METADATA_KEY]: [actorId],
|
|
15
|
-
});
|
|
16
|
-
if (tenant) {
|
|
17
|
-
const agentContextProvider = rootAgentContext.dependencyManager.resolve(core_1.InjectionSymbols.AgentContextProvider);
|
|
18
|
-
return agentContextProvider.getAgentContextForContextCorrelationId(tenant.id);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
return rootAgentContext;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Store the actor id associated with a context correlation id. If multi-tenancy is not used
|
|
25
|
-
* this method won't do anything as we can just use the actor from the default context. However
|
|
26
|
-
* if multi-tenancy is used, we will store the actor id in the tenant record metadata so it can
|
|
27
|
-
* be queried when a request comes in for the specific actor id.
|
|
28
|
-
*
|
|
29
|
-
* The reason for doing this is that we don't want to expose the context correlation id in the
|
|
30
|
-
* actor metadata url, as it is then possible to see exactly which actors are registered under
|
|
31
|
-
* the same agent.
|
|
32
|
-
*/
|
|
33
|
-
async function storeActorIdForContextCorrelationId(agentContext, actorId) {
|
|
34
|
-
var _a;
|
|
35
|
-
// It's kind of hacky, but we add support for the tenants module specifically here to map an actorId to
|
|
36
|
-
// a specific tenant. Otherwise we have to expose /:contextCorrelationId/:actorId in all the public URLs
|
|
37
|
-
// which is of course not so nice.
|
|
38
|
-
const tenantsApi = (0, core_1.getApiForModuleByName)(agentContext, 'TenantsModule');
|
|
39
|
-
// We don't want to query the tenant record if the current context is the root context
|
|
40
|
-
if (tenantsApi && tenantsApi.rootAgentContext.contextCorrelationId !== agentContext.contextCorrelationId) {
|
|
41
|
-
const tenantRecord = await tenantsApi.getTenantById(agentContext.contextCorrelationId);
|
|
42
|
-
const currentOpenId4VcActorIds = (_a = tenantRecord.metadata.get(OPENID4VC_ACTOR_IDS_METADATA_KEY)) !== null && _a !== void 0 ? _a : [];
|
|
43
|
-
const openId4VcActorIds = [...currentOpenId4VcActorIds, actorId];
|
|
44
|
-
tenantRecord.metadata.set(OPENID4VC_ACTOR_IDS_METADATA_KEY, openId4VcActorIds);
|
|
45
|
-
tenantRecord.setTag(OPENID4VC_ACTOR_IDS_METADATA_KEY, openId4VcActorIds);
|
|
46
|
-
await tenantsApi.updateTenant(tenantRecord);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
//# sourceMappingURL=tenants.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tenants.js","sourceRoot":"","sources":["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AM,iBAAiB,GAAG,CAAC,GAAG,wBAAwB,EAAE,OAAO,CAAC,CAAA;QAEhE,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,gCAAgC,EAAE,iBAAiB,CAAC,CAAA;QAC9E,YAAY,CAAC,MAAM,CAAC,gCAAgC,EAAE,iBAAiB,CAAC,CAAA;QACxE,MAAM,UAAU,CAAC,YAAY,CAAC,YAAY,CAAC,CAAA;IAC7C,CAAC;AACH,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { VerifiablePresentation, VerifiableCredential } from '@credo-ts/core';
|
|
2
|
-
import type { W3CVerifiableCredential as SphereonW3cVerifiableCredential, W3CVerifiablePresentation as SphereonW3cVerifiablePresentation, CompactSdJwtVc as SphereonCompactSdJwtVc, WrappedVerifiablePresentation } from '@sphereon/ssi-types';
|
|
3
|
-
export declare function getSphereonVerifiableCredential(verifiableCredential: VerifiableCredential): SphereonW3cVerifiableCredential | SphereonCompactSdJwtVc | string;
|
|
4
|
-
export declare function getSphereonVerifiablePresentation(verifiablePresentation: VerifiablePresentation): SphereonW3cVerifiablePresentation | SphereonCompactSdJwtVc | string;
|
|
5
|
-
export declare function getVerifiablePresentationFromSphereonWrapped(wrappedVerifiablePresentation: WrappedVerifiablePresentation): VerifiablePresentation;
|