@credo-ts/openid4vc 0.6.1-pr-2091-20241119140918 → 0.6.1
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
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { __decorateMetadata } from "../../_virtual/_@oxc-project_runtime@0.99.0/helpers/decorateMetadata.mjs";
|
|
2
|
+
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.99.0/helpers/decorate.mjs";
|
|
3
|
+
import { BaseRecord, CredoError, Kms, isJsonObject, utils } from "@credo-ts/core";
|
|
4
|
+
import { credentialsSupportedToCredentialConfigurationsSupported } from "@openid4vc/openid4vci";
|
|
5
|
+
import { Transform, TransformationType } from "class-transformer";
|
|
6
|
+
|
|
7
|
+
//#region src/openid4vc-issuer/repository/OpenId4VcIssuerRecord.ts
|
|
8
|
+
/**
|
|
9
|
+
* For OID4VC you need to expose metadata files. Each issuer needs to host this metadata. This is not the case for DIDComm where we can just have one /didcomm endpoint.
|
|
10
|
+
* So we create a record per openid issuer/verifier that you want, and each tenant can create multiple issuers/verifiers which have different endpoints
|
|
11
|
+
* and metadata files
|
|
12
|
+
* */
|
|
13
|
+
var OpenId4VcIssuerRecord = class OpenId4VcIssuerRecord extends BaseRecord {
|
|
14
|
+
/**
|
|
15
|
+
* Only here for class transformation. If credentialsSupported is set we transform
|
|
16
|
+
* it to the new credentialConfigurationsSupported format
|
|
17
|
+
*/
|
|
18
|
+
set credentialsSupported(credentialsSupported) {
|
|
19
|
+
if (this.credentialConfigurationsSupported) return;
|
|
20
|
+
this.credentialConfigurationsSupported = credentialsSupportedToCredentialConfigurationsSupported(credentialsSupported);
|
|
21
|
+
}
|
|
22
|
+
get directAuthorizationServerConfigs() {
|
|
23
|
+
return this.authorizationServerConfigs?.filter((config) => config.type === "direct");
|
|
24
|
+
}
|
|
25
|
+
get chainedAuthorizationServerConfigs() {
|
|
26
|
+
return this.authorizationServerConfigs?.filter((config) => config.type === "chained");
|
|
27
|
+
}
|
|
28
|
+
get resolvedAccessTokenPublicJwk() {
|
|
29
|
+
if (this.accessTokenPublicJwk) return Kms.PublicJwk.fromPublicJwk(this.accessTokenPublicJwk);
|
|
30
|
+
if (this.accessTokenPublicKeyFingerprint) {
|
|
31
|
+
const publicJwk = Kms.PublicJwk.fromFingerprint(this.accessTokenPublicKeyFingerprint);
|
|
32
|
+
publicJwk.keyId = publicJwk.legacyKeyId;
|
|
33
|
+
return publicJwk;
|
|
34
|
+
}
|
|
35
|
+
throw new CredoError("Neither accessTokenPublicJwk or accessTokenPublicKeyFingerprint defined. Unable to resolve access token public jwk.");
|
|
36
|
+
}
|
|
37
|
+
constructor(props) {
|
|
38
|
+
super();
|
|
39
|
+
this.type = OpenId4VcIssuerRecord.type;
|
|
40
|
+
if (props) {
|
|
41
|
+
this.id = props.id ?? utils.uuid();
|
|
42
|
+
this.createdAt = props.createdAt ?? /* @__PURE__ */ new Date();
|
|
43
|
+
this._tags = props.tags ?? {};
|
|
44
|
+
this.issuerId = props.issuerId;
|
|
45
|
+
this.accessTokenPublicJwk = props.accessTokenPublicJwk;
|
|
46
|
+
this.credentialConfigurationsSupported = props.credentialConfigurationsSupported;
|
|
47
|
+
this.dpopSigningAlgValuesSupported = props.dpopSigningAlgValuesSupported;
|
|
48
|
+
this.display = props.display;
|
|
49
|
+
this.authorizationServerConfigs = props.authorizationServerConfigs;
|
|
50
|
+
this.batchCredentialIssuance = props.batchCredentialIssuance;
|
|
51
|
+
this.signedMetadata = props.signedMetadata;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
getTags() {
|
|
55
|
+
return {
|
|
56
|
+
...this._tags,
|
|
57
|
+
issuerId: this.issuerId
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
OpenId4VcIssuerRecord.type = "OpenId4VcIssuerRecord";
|
|
62
|
+
__decorate([Transform(({ type, value }) => {
|
|
63
|
+
if (type === TransformationType.PLAIN_TO_CLASS && Array.isArray(value)) return value.map((display) => {
|
|
64
|
+
if (display.logo?.uri) return display;
|
|
65
|
+
const { url, ...logoRest } = display.logo ?? {};
|
|
66
|
+
return {
|
|
67
|
+
...display,
|
|
68
|
+
logo: url ? {
|
|
69
|
+
...logoRest,
|
|
70
|
+
uri: url
|
|
71
|
+
} : void 0
|
|
72
|
+
};
|
|
73
|
+
});
|
|
74
|
+
return value;
|
|
75
|
+
}), __decorateMetadata("design:type", Array)], OpenId4VcIssuerRecord.prototype, "display", void 0);
|
|
76
|
+
__decorate([Transform(({ type, value }) => {
|
|
77
|
+
if (type === TransformationType.PLAIN_TO_CLASS && Array.isArray(value)) return value.map((config) => {
|
|
78
|
+
if (isJsonObject(config) && typeof config.type === "undefined") return {
|
|
79
|
+
...config,
|
|
80
|
+
type: "direct"
|
|
81
|
+
};
|
|
82
|
+
return config;
|
|
83
|
+
});
|
|
84
|
+
return value;
|
|
85
|
+
}), __decorateMetadata("design:type", Array)], OpenId4VcIssuerRecord.prototype, "authorizationServerConfigs", void 0);
|
|
86
|
+
|
|
87
|
+
//#endregion
|
|
88
|
+
export { OpenId4VcIssuerRecord };
|
|
89
|
+
//# sourceMappingURL=OpenId4VcIssuerRecord.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OpenId4VcIssuerRecord.mjs","names":[],"sources":["../../../src/openid4vc-issuer/repository/OpenId4VcIssuerRecord.ts"],"sourcesContent":["import { BaseRecord, CredoError, isJsonObject, Kms, type RecordTags, type TagsBase, utils } from '@credo-ts/core'\nimport { credentialsSupportedToCredentialConfigurationsSupported } from '@openid4vc/openid4vci'\nimport { Transform, TransformationType } from 'class-transformer'\nimport type {\n OpenId4VciAuthorizationServerConfig,\n OpenId4VciCredentialConfigurationsSupportedWithFormats,\n OpenId4VciCredentialIssuerMetadataDisplay,\n OpenId4VcJwtIssuerEncoded,\n} from '../../shared'\nimport type { OpenId4VciBatchCredentialIssuanceOptions } from '../OpenId4VcIssuerServiceOptions'\n\nexport type OpenId4VcIssuerRecordTags = RecordTags<OpenId4VcIssuerRecord>\n\nexport type DefaultOpenId4VcIssuerRecordTags = {\n issuerId: string\n}\n\nexport type OpenId4VcIssuerRecordSignedMetadata = {\n signer: OpenId4VcJwtIssuerEncoded\n\n /**\n * The credential issuer metadata as a signed JWT\n */\n jwt: string\n}\n\nexport type OpenId4VcIssuerRecordProps = {\n id?: string\n createdAt?: Date\n tags?: TagsBase\n\n issuerId: string\n\n /**\n * The public jwk of the key used to sign access tokens for this issuer. Must include a `kid` parameter.\n */\n accessTokenPublicJwk: Kms.KmsJwkPublicAsymmetric\n\n /**\n * The DPoP signing algorithms supported by this issuer.\n * If not provided, dPoP is considered unsupported.\n */\n dpopSigningAlgValuesSupported?: [Kms.KnownJwaSignatureAlgorithm, ...Kms.KnownJwaSignatureAlgorithm[]]\n\n display?: OpenId4VciCredentialIssuerMetadataDisplay[]\n authorizationServerConfigs?: OpenId4VciAuthorizationServerConfig[]\n\n credentialConfigurationsSupported: OpenId4VciCredentialConfigurationsSupportedWithFormats\n\n /**\n * Indicate support for batch issuance of credentials\n */\n batchCredentialIssuance?: OpenId4VciBatchCredentialIssuanceOptions\n\n /**\n * When signed metadata is supported, this stores the\n * signed jwt and signer information to update the JWT in the future.\n */\n signedMetadata?: OpenId4VcIssuerRecordSignedMetadata\n}\n\n/**\n * For OID4VC you need to expose metadata files. Each issuer needs to host this metadata. This is not the case for DIDComm where we can just have one /didcomm endpoint.\n * So we create a record per openid issuer/verifier that you want, and each tenant can create multiple issuers/verifiers which have different endpoints\n * and metadata files\n * */\nexport class OpenId4VcIssuerRecord extends BaseRecord<DefaultOpenId4VcIssuerRecordTags> {\n public static readonly type = 'OpenId4VcIssuerRecord'\n public readonly type = OpenId4VcIssuerRecord.type\n\n public issuerId!: string\n\n /**\n * @deprecated accessTokenPublicJwk should be used\n * @todo remove in migration\n */\n public accessTokenPublicKeyFingerprint?: string\n public accessTokenPublicJwk?: Kms.KmsJwkPublicAsymmetric\n\n /**\n * Only here for class transformation. If credentialsSupported is set we transform\n * it to the new credentialConfigurationsSupported format\n */\n // biome-ignore lint/correctness/noUnusedPrivateClassMembers: see above\n private set credentialsSupported(credentialsSupported: Array<unknown>) {\n if (this.credentialConfigurationsSupported) return\n\n this.credentialConfigurationsSupported =\n // biome-ignore lint/suspicious/noExplicitAny: no explanation\n credentialsSupportedToCredentialConfigurationsSupported(credentialsSupported as any) as any\n }\n\n public credentialConfigurationsSupported!: OpenId4VciCredentialConfigurationsSupportedWithFormats\n\n // Draft 11 to draft 13+ syntax\n @Transform(({ type, value }) => {\n if (type === TransformationType.PLAIN_TO_CLASS && Array.isArray(value)) {\n return value.map((display) => {\n if (display.logo?.uri) return display\n\n const { url, ...logoRest } = display.logo ?? {}\n return {\n ...display,\n logo: url\n ? {\n ...logoRest,\n uri: url,\n }\n : undefined,\n }\n })\n }\n\n return value\n })\n public display?: OpenId4VciCredentialIssuerMetadataDisplay[]\n\n // Adds the type field if missing (for older records)\n @Transform(({ type, value }) => {\n if (type === TransformationType.PLAIN_TO_CLASS && Array.isArray(value)) {\n return value.map((config) => {\n if (isJsonObject(config) && typeof config.type === 'undefined') {\n return {\n ...config,\n type: 'direct',\n }\n }\n\n return config\n })\n }\n\n return value\n })\n public authorizationServerConfigs?: OpenId4VciAuthorizationServerConfig[]\n\n public dpopSigningAlgValuesSupported?: [Kms.KnownJwaSignatureAlgorithm, ...Kms.KnownJwaSignatureAlgorithm[]]\n public batchCredentialIssuance?: OpenId4VciBatchCredentialIssuanceOptions\n\n public signedMetadata?: OpenId4VcIssuerRecordSignedMetadata\n\n public get directAuthorizationServerConfigs() {\n return this.authorizationServerConfigs?.filter((config) => config.type === 'direct')\n }\n\n public get chainedAuthorizationServerConfigs() {\n return this.authorizationServerConfigs?.filter((config) => config.type === 'chained')\n }\n\n public get resolvedAccessTokenPublicJwk() {\n if (this.accessTokenPublicJwk) {\n return Kms.PublicJwk.fromPublicJwk(this.accessTokenPublicJwk)\n }\n\n // From before we introduced key ids, uses legacy key id\n if (this.accessTokenPublicKeyFingerprint) {\n const publicJwk = Kms.PublicJwk.fromFingerprint(this.accessTokenPublicKeyFingerprint)\n publicJwk.keyId = publicJwk.legacyKeyId\n return publicJwk\n }\n\n throw new CredoError(\n 'Neither accessTokenPublicJwk or accessTokenPublicKeyFingerprint defined. Unable to resolve access token public jwk.'\n )\n }\n\n public constructor(props: OpenId4VcIssuerRecordProps) {\n super()\n\n if (props) {\n this.id = props.id ?? utils.uuid()\n this.createdAt = props.createdAt ?? new Date()\n this._tags = props.tags ?? {}\n\n this.issuerId = props.issuerId\n this.accessTokenPublicJwk = props.accessTokenPublicJwk\n this.credentialConfigurationsSupported = props.credentialConfigurationsSupported\n this.dpopSigningAlgValuesSupported = props.dpopSigningAlgValuesSupported\n this.display = props.display\n this.authorizationServerConfigs = props.authorizationServerConfigs\n this.batchCredentialIssuance = props.batchCredentialIssuance\n this.signedMetadata = props.signedMetadata\n }\n }\n\n public getTags() {\n return {\n ...this._tags,\n issuerId: this.issuerId,\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;AAkEA,IAAa,wBAAb,MAAa,8BAA8B,WAA6C;;;;;CAkBtF,IAAY,qBAAqB,sBAAsC;AACrE,MAAI,KAAK,kCAAmC;AAE5C,OAAK,oCAEH,wDAAwD,qBAA4B;;CAoDxF,IAAW,mCAAmC;AAC5C,SAAO,KAAK,4BAA4B,QAAQ,WAAW,OAAO,SAAS,SAAS;;CAGtF,IAAW,oCAAoC;AAC7C,SAAO,KAAK,4BAA4B,QAAQ,WAAW,OAAO,SAAS,UAAU;;CAGvF,IAAW,+BAA+B;AACxC,MAAI,KAAK,qBACP,QAAO,IAAI,UAAU,cAAc,KAAK,qBAAqB;AAI/D,MAAI,KAAK,iCAAiC;GACxC,MAAM,YAAY,IAAI,UAAU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js";
|
|
2
|
+
import { AgentContext, EventEmitter, Repository, StorageService } from "@credo-ts/core";
|
|
3
|
+
|
|
4
|
+
//#region src/openid4vc-issuer/repository/OpenId4VcIssuerRepository.d.ts
|
|
5
|
+
declare class OpenId4VcIssuerRepository extends Repository<OpenId4VcIssuerRecord> {
|
|
6
|
+
constructor(storageService: StorageService<OpenId4VcIssuerRecord>, eventEmitter: EventEmitter);
|
|
7
|
+
findByIssuerId(agentContext: AgentContext, issuerId: string): Promise<OpenId4VcIssuerRecord | null>;
|
|
8
|
+
getByIssuerId(agentContext: AgentContext, issuerId: string): Promise<OpenId4VcIssuerRecord>;
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { OpenId4VcIssuerRepository };
|
|
12
|
+
//# sourceMappingURL=OpenId4VcIssuerRepository.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OpenId4VcIssuerRepository.d.mts","names":[],"sources":["../../../src/openid4vc-issuer/repository/OpenId4VcIssuerRepository.ts"],"sourcesContent":[],"mappings":";;;;cAOa,yBAAA,SAAkC,WAAW;EAA7C,WAAA,CAAA,cAAA,EAEgD,cAFtB,CAEqC,qBAFrC,CAAA,EAAA,YAAA,EAGrB,YAHqB;EAAmB,cAAA,CAAA,YAAA,EAQpB,YARoB,EAAA,QAAA,EAAA,MAAA,CAAA,EAQU,OARV,CAQU,qBARV,GAAA,IAAA,CAAA;EAEkB,aAAA,CAAA,YAAA,EAUvC,YAVuC,EAAA,QAAA,EAAA,MAAA,CAAA,EAUT,OAVS,CAUT,qBAVS,CAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { __decorateMetadata } from "../../_virtual/_@oxc-project_runtime@0.99.0/helpers/decorateMetadata.mjs";
|
|
2
|
+
import { __decorateParam } from "../../_virtual/_@oxc-project_runtime@0.99.0/helpers/decorateParam.mjs";
|
|
3
|
+
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.99.0/helpers/decorate.mjs";
|
|
4
|
+
import { OpenId4VcIssuerRecord } from "./OpenId4VcIssuerRecord.mjs";
|
|
5
|
+
import { EventEmitter, InjectionSymbols, Repository, inject, injectable } from "@credo-ts/core";
|
|
6
|
+
|
|
7
|
+
//#region src/openid4vc-issuer/repository/OpenId4VcIssuerRepository.ts
|
|
8
|
+
var _ref;
|
|
9
|
+
let OpenId4VcIssuerRepository = class OpenId4VcIssuerRepository$1 extends Repository {
|
|
10
|
+
constructor(storageService, eventEmitter) {
|
|
11
|
+
super(OpenId4VcIssuerRecord, storageService, eventEmitter);
|
|
12
|
+
}
|
|
13
|
+
findByIssuerId(agentContext, issuerId) {
|
|
14
|
+
return this.findSingleByQuery(agentContext, { issuerId });
|
|
15
|
+
}
|
|
16
|
+
getByIssuerId(agentContext, issuerId) {
|
|
17
|
+
return this.getSingleByQuery(agentContext, { issuerId });
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
OpenId4VcIssuerRepository = __decorate([
|
|
21
|
+
injectable(),
|
|
22
|
+
__decorateParam(0, inject(InjectionSymbols.StorageService)),
|
|
23
|
+
__decorateMetadata("design:paramtypes", [Object, typeof (_ref = typeof EventEmitter !== "undefined" && EventEmitter) === "function" ? _ref : Object])
|
|
24
|
+
], OpenId4VcIssuerRepository);
|
|
25
|
+
|
|
26
|
+
//#endregion
|
|
27
|
+
export { OpenId4VcIssuerRepository };
|
|
28
|
+
//# sourceMappingURL=OpenId4VcIssuerRepository.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OpenId4VcIssuerRepository.mjs","names":["OpenId4VcIssuerRepository","storageService: StorageService<OpenId4VcIssuerRecord>"],"sources":["../../../src/openid4vc-issuer/repository/OpenId4VcIssuerRepository.ts"],"sourcesContent":["import type { AgentContext } from '@credo-ts/core'\n\nimport { EventEmitter, InjectionSymbols, inject, injectable, Repository, type StorageService } from '@credo-ts/core'\n\nimport { OpenId4VcIssuerRecord } from './OpenId4VcIssuerRecord'\n\n@injectable()\nexport class OpenId4VcIssuerRepository extends Repository<OpenId4VcIssuerRecord> {\n public constructor(\n @inject(InjectionSymbols.StorageService) storageService: StorageService<OpenId4VcIssuerRecord>,\n eventEmitter: EventEmitter\n ) {\n super(OpenId4VcIssuerRecord, storageService, eventEmitter)\n }\n\n public findByIssuerId(agentContext: AgentContext, issuerId: string) {\n return this.findSingleByQuery(agentContext, { issuerId })\n }\n\n public getByIssuerId(agentContext: AgentContext, issuerId: string) {\n return this.getSingleByQuery(agentContext, { issuerId })\n }\n}\n"],"mappings":";;;;;;;;AAOO,sCAAMA,oCAAkC,WAAkC;CAC/E,AAAO,YACL,AAAyCC,gBACzC,cACA;AACA,QAAM,uBAAuB,gBAAgB,aAAa;;CAG5D,AAAO,eAAe,cAA4B,UAAkB;AAClE,SAAO,KAAK,kBAAkB,cAAc,EAAE,UAAU,CAAC;;CAG3D,AAAO,cAAc,cAA4B,UAAkB;AACjE,SAAO,KAAK,iBAAiB,cAAc,EAAE,UAAU,CAAC;;;;CAd3D,YAAY;oBAGR,OAAO,iBAAiB,eAAe"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { DefaultOpenId4VcIssuanceSessionRecordTags, OpenId4VcIssuanceSessionAuthorization, OpenId4VcIssuanceSessionChainedIdentity, OpenId4VcIssuanceSessionDpop, OpenId4VcIssuanceSessionPkce, OpenId4VcIssuanceSessionPresentation, OpenId4VcIssuanceSessionRecord, OpenId4VcIssuanceSessionRecordProps, OpenId4VcIssuanceSessionRecordTransaction, OpenId4VcIssuanceSessionWalletAttestation } from "./OpenId4VcIssuanceSessionRecord.mjs";
|
|
2
|
+
import { OpenId4VcIssuanceSessionRepository } from "./OpenId4VcIssuanceSessionRepository.mjs";
|
|
3
|
+
import { DefaultOpenId4VcIssuerRecordTags, OpenId4VcIssuerRecord, OpenId4VcIssuerRecordProps, OpenId4VcIssuerRecordSignedMetadata, OpenId4VcIssuerRecordTags } from "./OpenId4VcIssuerRecord.mjs";
|
|
4
|
+
import { OpenId4VcIssuerRepository } from "./OpenId4VcIssuerRepository.mjs";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { OpenId4VcIssuanceSessionRecord } from "./OpenId4VcIssuanceSessionRecord.mjs";
|
|
2
|
+
import { OpenId4VcIssuanceSessionRepository } from "./OpenId4VcIssuanceSessionRepository.mjs";
|
|
3
|
+
import { OpenId4VcIssuerRecord } from "./OpenId4VcIssuerRecord.mjs";
|
|
4
|
+
import { OpenId4VcIssuerRepository } from "./OpenId4VcIssuerRepository.mjs";
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import { getRequestContext, sendJsonResponse, sendOauth2ErrorResponse, sendUnknownServerErrorResponse } from "../../shared/router/context.mjs";
|
|
2
|
+
import "../../shared/router/index.mjs";
|
|
3
|
+
import { OpenId4VcIssuanceSessionState } from "../OpenId4VcIssuanceSessionState.mjs";
|
|
4
|
+
import { OpenId4VcIssuanceSessionRepository } from "../repository/OpenId4VcIssuanceSessionRepository.mjs";
|
|
5
|
+
import "../repository/index.mjs";
|
|
6
|
+
import { OpenId4VcIssuerService } from "../OpenId4VcIssuerService.mjs";
|
|
7
|
+
import { CredoError, joinUriParts, utils } from "@credo-ts/core";
|
|
8
|
+
import { Oauth2ErrorCodes, Oauth2ServerErrorResponseError, authorizationCodeGrantIdentifier, preAuthorizedCodeGrantIdentifier, refreshTokenGrantIdentifier } from "@openid4vc/oauth2";
|
|
9
|
+
|
|
10
|
+
//#region src/openid4vc-issuer/router/accessTokenEndpoint.ts
|
|
11
|
+
function configureAccessTokenEndpoint(router, config) {
|
|
12
|
+
router.post(config.accessTokenEndpointPath, handleTokenRequest(config));
|
|
13
|
+
}
|
|
14
|
+
function handleTokenRequest(config) {
|
|
15
|
+
return async (request, response, next) => {
|
|
16
|
+
response.set({
|
|
17
|
+
"Cache-Control": "no-store",
|
|
18
|
+
Pragma: "no-cache"
|
|
19
|
+
});
|
|
20
|
+
const { agentContext, issuer } = getRequestContext(request);
|
|
21
|
+
try {
|
|
22
|
+
const openId4VcIssuerService = agentContext.dependencyManager.resolve(OpenId4VcIssuerService);
|
|
23
|
+
const issuanceSessionRepository = agentContext.dependencyManager.resolve(OpenId4VcIssuanceSessionRepository);
|
|
24
|
+
const issuerMetadata = await openId4VcIssuerService.getIssuerMetadata(agentContext, issuer);
|
|
25
|
+
const accessTokenSigningKey = issuer.resolvedAccessTokenPublicJwk;
|
|
26
|
+
let oauth2AuthorizationServer = openId4VcIssuerService.getOauth2AuthorizationServer(agentContext);
|
|
27
|
+
const fullRequestUrl = joinUriParts(issuerMetadata.credentialIssuer.credential_issuer, [config.accessTokenEndpointPath]);
|
|
28
|
+
const requestLike = {
|
|
29
|
+
headers: new Headers(request.headers),
|
|
30
|
+
method: request.method,
|
|
31
|
+
url: fullRequestUrl
|
|
32
|
+
};
|
|
33
|
+
const { accessTokenRequest, grant, dpop, clientAttestation, pkceCodeVerifier } = oauth2AuthorizationServer.parseAccessTokenRequest({
|
|
34
|
+
accessTokenRequest: request.body,
|
|
35
|
+
request: requestLike
|
|
36
|
+
});
|
|
37
|
+
let allowedStates;
|
|
38
|
+
let query;
|
|
39
|
+
let parsedRefreshToken;
|
|
40
|
+
switch (grant.grantType) {
|
|
41
|
+
case preAuthorizedCodeGrantIdentifier:
|
|
42
|
+
allowedStates = [OpenId4VcIssuanceSessionState.OfferCreated, OpenId4VcIssuanceSessionState.OfferUriRetrieved];
|
|
43
|
+
query = { preAuthorizedCode: grant.preAuthorizedCode };
|
|
44
|
+
break;
|
|
45
|
+
case authorizationCodeGrantIdentifier:
|
|
46
|
+
allowedStates = [OpenId4VcIssuanceSessionState.AuthorizationGranted];
|
|
47
|
+
query = { authorizationCode: grant.code };
|
|
48
|
+
break;
|
|
49
|
+
case refreshTokenGrantIdentifier:
|
|
50
|
+
allowedStates = [OpenId4VcIssuanceSessionState.CredentialRequestReceived, OpenId4VcIssuanceSessionState.CredentialsPartiallyIssued];
|
|
51
|
+
parsedRefreshToken = openId4VcIssuerService.parseRefreshToken(grant.refreshToken);
|
|
52
|
+
query = {
|
|
53
|
+
preAuthorizedCode: parsedRefreshToken.preAuthorizedCode,
|
|
54
|
+
authorizationCode: parsedRefreshToken.issuerState
|
|
55
|
+
};
|
|
56
|
+
break;
|
|
57
|
+
default: throw new Oauth2ServerErrorResponseError({
|
|
58
|
+
error: Oauth2ErrorCodes.UnsupportedGrantType,
|
|
59
|
+
error_description: "Unsupported grant type"
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
const issuanceSession = await issuanceSessionRepository.findSingleByQuery(agentContext, query);
|
|
63
|
+
if (!issuanceSession || !allowedStates.includes(issuanceSession.state)) throw new Oauth2ServerErrorResponseError({
|
|
64
|
+
error: Oauth2ErrorCodes.InvalidGrant,
|
|
65
|
+
error_description: "Invalid authorization code"
|
|
66
|
+
});
|
|
67
|
+
const expiresAt = issuanceSession.expiresAt ?? utils.addSecondsToDate(issuanceSession.createdAt, config.statefulCredentialOfferExpirationInSeconds);
|
|
68
|
+
if (Date.now() > expiresAt.getTime()) {
|
|
69
|
+
issuanceSession.errorMessage = "Credential offer has expired";
|
|
70
|
+
await openId4VcIssuerService.updateState(agentContext, issuanceSession, OpenId4VcIssuanceSessionState.Error);
|
|
71
|
+
throw new Oauth2ServerErrorResponseError({
|
|
72
|
+
error: Oauth2ErrorCodes.InvalidGrant,
|
|
73
|
+
error_description: "Session expired"
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
oauth2AuthorizationServer = openId4VcIssuerService.getOauth2AuthorizationServer(agentContext, { issuanceSessionId: issuanceSession.id });
|
|
77
|
+
let verificationResult;
|
|
78
|
+
if (grant.grantType === preAuthorizedCodeGrantIdentifier) {
|
|
79
|
+
if (!issuanceSession.preAuthorizedCode) throw new Oauth2ServerErrorResponseError({
|
|
80
|
+
error: Oauth2ErrorCodes.InvalidGrant,
|
|
81
|
+
error_description: "Invalid authorization code"
|
|
82
|
+
}, { internalMessage: "Found issuance session without preAuthorizedCode. This should not happen as the issuance session is fetched based on the pre authorized code" });
|
|
83
|
+
verificationResult = await oauth2AuthorizationServer.verifyPreAuthorizedCodeAccessTokenRequest({
|
|
84
|
+
accessTokenRequest,
|
|
85
|
+
expectedPreAuthorizedCode: issuanceSession.preAuthorizedCode,
|
|
86
|
+
grant,
|
|
87
|
+
request: requestLike,
|
|
88
|
+
authorizationServerMetadata: issuerMetadata.authorizationServers[0],
|
|
89
|
+
clientAttestation: {
|
|
90
|
+
...clientAttestation,
|
|
91
|
+
required: issuanceSession.walletAttestation?.required ?? config.walletAttestationsRequired
|
|
92
|
+
},
|
|
93
|
+
dpop: {
|
|
94
|
+
...dpop,
|
|
95
|
+
required: issuanceSession.dpop?.required ?? config.dpopRequired
|
|
96
|
+
},
|
|
97
|
+
expectedTxCode: issuanceSession.userPin,
|
|
98
|
+
preAuthorizedCodeExpiresAt: issuanceSession.expiresAt ?? utils.addSecondsToDate(issuanceSession.createdAt, config.statefulCredentialOfferExpirationInSeconds)
|
|
99
|
+
});
|
|
100
|
+
} else if (grant.grantType === authorizationCodeGrantIdentifier) {
|
|
101
|
+
if (!issuanceSession.authorization?.code || !issuanceSession.authorization?.codeExpiresAt) throw new Oauth2ServerErrorResponseError({
|
|
102
|
+
error: Oauth2ErrorCodes.InvalidGrant,
|
|
103
|
+
error_description: "Invalid authorization code"
|
|
104
|
+
}, { internalMessage: "Found issuance session without authorization.code or authorization.codeExpiresAt. This should not happen as the issuance session is fetched based on the authorization code" });
|
|
105
|
+
verificationResult = await oauth2AuthorizationServer.verifyAuthorizationCodeAccessTokenRequest({
|
|
106
|
+
accessTokenRequest,
|
|
107
|
+
expectedCode: issuanceSession.authorization.code,
|
|
108
|
+
codeExpiresAt: issuanceSession.authorization.codeExpiresAt,
|
|
109
|
+
grant,
|
|
110
|
+
authorizationServerMetadata: issuerMetadata.authorizationServers[0],
|
|
111
|
+
request: requestLike,
|
|
112
|
+
clientAttestation: {
|
|
113
|
+
...clientAttestation,
|
|
114
|
+
expectedClientId: issuanceSession.clientId,
|
|
115
|
+
required: issuanceSession.walletAttestation?.required
|
|
116
|
+
},
|
|
117
|
+
dpop: {
|
|
118
|
+
...dpop,
|
|
119
|
+
required: issuanceSession.dpop?.required,
|
|
120
|
+
expectedJwkThumbprint: issuanceSession.dpop?.dpopJkt
|
|
121
|
+
},
|
|
122
|
+
pkce: issuanceSession.pkce ? {
|
|
123
|
+
codeChallenge: issuanceSession.pkce.codeChallenge,
|
|
124
|
+
codeChallengeMethod: issuanceSession.pkce.codeChallengeMethod,
|
|
125
|
+
codeVerifier: pkceCodeVerifier
|
|
126
|
+
} : void 0
|
|
127
|
+
});
|
|
128
|
+
} else if (grant.grantType === refreshTokenGrantIdentifier) {
|
|
129
|
+
if (!parsedRefreshToken) throw new CredoError("Refresh token verification is required for refresh token grant type");
|
|
130
|
+
verificationResult = await oauth2AuthorizationServer.verifyRefreshTokenAccessTokenRequest({
|
|
131
|
+
accessTokenRequest,
|
|
132
|
+
expectedRefreshToken: grant.refreshToken,
|
|
133
|
+
grant,
|
|
134
|
+
request: requestLike,
|
|
135
|
+
authorizationServerMetadata: issuerMetadata.authorizationServers[0],
|
|
136
|
+
clientAttestation: {
|
|
137
|
+
...clientAttestation,
|
|
138
|
+
required: issuanceSession.walletAttestation?.required ?? config.walletAttestationsRequired
|
|
139
|
+
},
|
|
140
|
+
dpop: {
|
|
141
|
+
...dpop,
|
|
142
|
+
required: issuanceSession.dpop?.required ?? config.dpopRequired
|
|
143
|
+
},
|
|
144
|
+
refreshTokenExpiresAt: parsedRefreshToken?.expiresAt
|
|
145
|
+
});
|
|
146
|
+
await openId4VcIssuerService.verifyRefreshToken(agentContext, issuer, parsedRefreshToken, { dpop: verificationResult.dpop });
|
|
147
|
+
} else throw new Oauth2ServerErrorResponseError({
|
|
148
|
+
error: Oauth2ErrorCodes.UnsupportedGrantType,
|
|
149
|
+
error_description: "Unsupported grant type"
|
|
150
|
+
});
|
|
151
|
+
if (grant.grantType !== refreshTokenGrantIdentifier) await openId4VcIssuerService.updateState(agentContext, issuanceSession, OpenId4VcIssuanceSessionState.AccessTokenRequested);
|
|
152
|
+
const { cNonce, cNonceExpiresInSeconds } = await openId4VcIssuerService.createNonce(agentContext, issuer);
|
|
153
|
+
const scopes = grant.grantType === authorizationCodeGrantIdentifier ? issuanceSession.authorization?.scopes : void 0;
|
|
154
|
+
const subject = `credo:${utils.uuid()}`;
|
|
155
|
+
const tokenDpop = verificationResult.dpop ? { jwk: verificationResult.dpop?.jwk } : void 0;
|
|
156
|
+
let refreshToken;
|
|
157
|
+
if (issuanceSession.generateRefreshTokens && grant.grantType !== refreshTokenGrantIdentifier) refreshToken = await openId4VcIssuerService.createRefreshToken(agentContext, issuer, {
|
|
158
|
+
preAuthorizedCode: grant.grantType === preAuthorizedCodeGrantIdentifier ? grant.preAuthorizedCode : void 0,
|
|
159
|
+
issuerState: issuanceSession.authorization?.issuerState,
|
|
160
|
+
dpop: tokenDpop
|
|
161
|
+
});
|
|
162
|
+
const signerJwk = accessTokenSigningKey;
|
|
163
|
+
const accessTokenResponse = await oauth2AuthorizationServer.createAccessTokenResponse({
|
|
164
|
+
audience: issuerMetadata.credentialIssuer.credential_issuer,
|
|
165
|
+
authorizationServer: issuerMetadata.credentialIssuer.credential_issuer,
|
|
166
|
+
expiresInSeconds: config.accessTokenExpiresInSeconds,
|
|
167
|
+
signer: {
|
|
168
|
+
method: "jwk",
|
|
169
|
+
alg: signerJwk.supportedSignatureAlgorithms[0],
|
|
170
|
+
publicJwk: signerJwk.toJson()
|
|
171
|
+
},
|
|
172
|
+
dpop: tokenDpop,
|
|
173
|
+
scope: scopes?.join(" "),
|
|
174
|
+
clientId: issuanceSession.clientId,
|
|
175
|
+
additionalAccessTokenPayload: {
|
|
176
|
+
"pre-authorized_code": grant.grantType === preAuthorizedCodeGrantIdentifier ? grant.preAuthorizedCode : parsedRefreshToken?.preAuthorizedCode,
|
|
177
|
+
issuer_state: issuanceSession.authorization?.issuerState
|
|
178
|
+
},
|
|
179
|
+
subject,
|
|
180
|
+
refreshToken,
|
|
181
|
+
cNonce,
|
|
182
|
+
cNonceExpiresIn: cNonceExpiresInSeconds
|
|
183
|
+
});
|
|
184
|
+
issuanceSession.authorization = {
|
|
185
|
+
...issuanceSession.authorization,
|
|
186
|
+
subject
|
|
187
|
+
};
|
|
188
|
+
await openId4VcIssuerService.updateState(agentContext, issuanceSession, grant.grantType === refreshTokenGrantIdentifier ? issuanceSession.state : OpenId4VcIssuanceSessionState.AccessTokenCreated);
|
|
189
|
+
return sendJsonResponse(response, next, accessTokenResponse);
|
|
190
|
+
} catch (error) {
|
|
191
|
+
if (error instanceof Oauth2ServerErrorResponseError) return sendOauth2ErrorResponse(response, next, agentContext.config.logger, error);
|
|
192
|
+
return sendUnknownServerErrorResponse(response, next, agentContext.config.logger, error);
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
//#endregion
|
|
198
|
+
export { configureAccessTokenEndpoint };
|
|
199
|
+
//# sourceMappingURL=accessTokenEndpoint.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accessTokenEndpoint.mjs","names":["allowedStates: OpenId4VcIssuanceSessionState[]","query: Query<OpenId4VcIssuanceSessionRecord>","parsedRefreshToken: ReturnType<OpenId4VcIssuerService['parseRefreshToken']> | undefined","verificationResult: VerifyAccessTokenRequestReturn","refreshToken: string | undefined"],"sources":["../../../src/openid4vc-issuer/router/accessTokenEndpoint.ts"],"sourcesContent":["import { CredoError, joinUriParts, type Query, utils } from '@credo-ts/core'\nimport type { HttpMethod, Jwk, VerifyAccessTokenRequestReturn } from '@openid4vc/oauth2'\nimport {\n authorizationCodeGrantIdentifier,\n Oauth2ErrorCodes,\n Oauth2ServerErrorResponseError,\n preAuthorizedCodeGrantIdentifier,\n refreshTokenGrantIdentifier,\n} from '@openid4vc/oauth2'\nimport type { NextFunction, Response, Router } from 'express'\nimport {\n getRequestContext,\n sendJsonResponse,\n sendOauth2ErrorResponse,\n sendUnknownServerErrorResponse,\n} from '../../shared/router'\nimport { OpenId4VcIssuanceSessionState } from '../OpenId4VcIssuanceSessionState'\nimport type { OpenId4VcIssuerModuleConfig } from '../OpenId4VcIssuerModuleConfig'\nimport { OpenId4VcIssuerService } from '../OpenId4VcIssuerService'\nimport { OpenId4VcIssuanceSessionRecord, OpenId4VcIssuanceSessionRepository } from '../repository'\nimport type { OpenId4VcIssuanceRequest } from './requestContext'\n\nexport function configureAccessTokenEndpoint(router: Router, config: OpenId4VcIssuerModuleConfig) {\n router.post(config.accessTokenEndpointPath, handleTokenRequest(config))\n}\n\nexport function handleTokenRequest(config: OpenId4VcIssuerModuleConfig) {\n return async (request: OpenId4VcIssuanceRequest, response: Response, next: NextFunction) => {\n response.set({ 'Cache-Control': 'no-store', Pragma: 'no-cache' })\n const requestContext = getRequestContext(request)\n const { agentContext, issuer } = requestContext\n\n try {\n const openId4VcIssuerService = agentContext.dependencyManager.resolve(OpenId4VcIssuerService)\n const issuanceSessionRepository = agentContext.dependencyManager.resolve(OpenId4VcIssuanceSessionRepository)\n const issuerMetadata = await openId4VcIssuerService.getIssuerMetadata(agentContext, issuer)\n const accessTokenSigningKey = issuer.resolvedAccessTokenPublicJwk\n let oauth2AuthorizationServer = openId4VcIssuerService.getOauth2AuthorizationServer(agentContext)\n\n const fullRequestUrl = joinUriParts(issuerMetadata.credentialIssuer.credential_issuer, [\n config.accessTokenEndpointPath,\n ])\n const requestLike = {\n headers: new Headers(request.headers as Record<string, string>),\n method: request.method as HttpMethod,\n url: fullRequestUrl,\n } as const\n\n const { accessTokenRequest, grant, dpop, clientAttestation, pkceCodeVerifier } =\n oauth2AuthorizationServer.parseAccessTokenRequest({\n accessTokenRequest: request.body,\n request: requestLike,\n })\n\n let allowedStates: OpenId4VcIssuanceSessionState[]\n let query: Query<OpenId4VcIssuanceSessionRecord>\n let parsedRefreshToken: ReturnType<OpenId4VcIssuerService['parseRefreshToken']> | undefined\n\n switch (grant.grantType) {\n case preAuthorizedCodeGrantIdentifier:\n allowedStates = [OpenId4VcIssuanceSessionState.OfferCreated, OpenId4VcIssuanceSessionState.OfferUriRetrieved]\n query = { preAuthorizedCode: grant.preAuthorizedCode }\n break\n case authorizationCodeGrantIdentifier:\n allowedStates = [OpenId4VcIssuanceSessionState.AuthorizationGranted]\n query = { authorizationCode: grant.code }\n break\n case refreshTokenGrantIdentifier:\n allowedStates = [\n OpenId4VcIssuanceSessionState.CredentialRequestReceived,\n OpenId4VcIssuanceSessionState.CredentialsPartiallyIssued,\n ]\n parsedRefreshToken = openId4VcIssuerService.parseRefreshToken(grant.refreshToken)\n query = {\n preAuthorizedCode: parsedRefreshToken.preAuthorizedCode,\n authorizationCode: parsedRefreshToken.issuerState,\n }\n break\n default:\n throw new Oauth2ServerErrorResponseError({\n error: Oauth2ErrorCodes.UnsupportedGrantType,\n error_description: 'Unsupported grant type',\n })\n }\n\n const issuanceSession = await issuanceSessionRepository.findSingleByQuery(agentContext, query)\n if (!issuanceSession || !allowedStates.includes(issuanceSession.state)) {\n throw new Oauth2ServerErrorResponseError({\n error: Oauth2ErrorCodes.InvalidGrant,\n error_description: 'Invalid authorization code',\n })\n }\n\n const expiresAt =\n issuanceSession.expiresAt ??\n utils.addSecondsToDate(issuanceSession.createdAt, config.statefulCredentialOfferExpirationInSeconds)\n\n if (Date.now() > expiresAt.getTime()) {\n issuanceSession.errorMessage = 'Credential offer has expired'\n await openId4VcIssuerService.updateState(agentContext, issuanceSession, OpenId4VcIssuanceSessionState.Error)\n throw new Oauth2ServerErrorResponseError({\n // What is the best error here?\n error: Oauth2ErrorCodes.InvalidGrant,\n error_description: 'Session expired',\n })\n }\n\n oauth2AuthorizationServer = openId4VcIssuerService.getOauth2AuthorizationServer(agentContext, {\n issuanceSessionId: issuanceSession.id,\n })\n let verificationResult: VerifyAccessTokenRequestReturn\n\n if (grant.grantType === preAuthorizedCodeGrantIdentifier) {\n if (!issuanceSession.preAuthorizedCode) {\n throw new Oauth2ServerErrorResponseError(\n {\n error: Oauth2ErrorCodes.InvalidGrant,\n error_description: 'Invalid authorization code',\n },\n {\n internalMessage:\n 'Found issuance session without preAuthorizedCode. This should not happen as the issuance session is fetched based on the pre authorized code',\n }\n )\n }\n\n verificationResult = await oauth2AuthorizationServer.verifyPreAuthorizedCodeAccessTokenRequest({\n accessTokenRequest,\n expectedPreAuthorizedCode: issuanceSession.preAuthorizedCode,\n grant,\n request: requestLike,\n authorizationServerMetadata: issuerMetadata.authorizationServers[0],\n clientAttestation: {\n ...clientAttestation,\n // First session config, fall back to global config\n required: issuanceSession.walletAttestation?.required ?? config.walletAttestationsRequired,\n\n // NOTE: we might want to enforce this? Not sure\n // ensureConfirmationKeyMatchesDpopKey: true\n },\n dpop: {\n ...dpop,\n // First session config, fall back to global config\n required: issuanceSession.dpop?.required ?? config.dpopRequired,\n },\n expectedTxCode: issuanceSession.userPin,\n preAuthorizedCodeExpiresAt:\n issuanceSession.expiresAt ??\n utils.addSecondsToDate(issuanceSession.createdAt, config.statefulCredentialOfferExpirationInSeconds),\n })\n } else if (grant.grantType === authorizationCodeGrantIdentifier) {\n if (!issuanceSession.authorization?.code || !issuanceSession.authorization?.codeExpiresAt) {\n throw new Oauth2ServerErrorResponseError(\n {\n error: Oauth2ErrorCodes.InvalidGrant,\n error_description: 'Invalid authorization code',\n },\n {\n internalMessage:\n 'Found issuance session without authorization.code or authorization.codeExpiresAt. This should not happen as the issuance session is fetched based on the authorization code',\n }\n )\n }\n verificationResult = await oauth2AuthorizationServer.verifyAuthorizationCodeAccessTokenRequest({\n accessTokenRequest,\n expectedCode: issuanceSession.authorization.code,\n codeExpiresAt: issuanceSession.authorization.codeExpiresAt,\n grant,\n authorizationServerMetadata: issuerMetadata.authorizationServers[0],\n request: requestLike,\n clientAttestation: {\n ...clientAttestation,\n\n // Ensure it matches the previously provided client id\n // FIXME: we don't verify that the attestation is issued by the same party\n expectedClientId: issuanceSession.clientId,\n\n // NOTE: we don't look at the global config here. As we already checked and\n // set required to true previously if client attestations were provided or required.\n required: issuanceSession.walletAttestation?.required,\n\n // NOTE: we might want to enforce this? Not sure\n // ensureConfirmationKeyMatchesDpopKey: true\n },\n dpop: {\n ...dpop,\n // NOTE: we don't look at the global config here. As we already checked and\n // set required to true previously if client attestations were provided or required.\n required: issuanceSession.dpop?.required,\n\n // Ensure it matches previously provided jwk thumbprint\n expectedJwkThumbprint: issuanceSession.dpop?.dpopJkt,\n },\n pkce: issuanceSession.pkce\n ? {\n codeChallenge: issuanceSession.pkce.codeChallenge,\n codeChallengeMethod: issuanceSession.pkce.codeChallengeMethod,\n codeVerifier: pkceCodeVerifier,\n }\n : undefined,\n })\n } else if (grant.grantType === refreshTokenGrantIdentifier) {\n if (!parsedRefreshToken) {\n throw new CredoError('Refresh token verification is required for refresh token grant type')\n }\n\n verificationResult = await oauth2AuthorizationServer.verifyRefreshTokenAccessTokenRequest({\n accessTokenRequest,\n // Refresh token validity is already checked before\n expectedRefreshToken: grant.refreshToken,\n grant,\n request: requestLike,\n authorizationServerMetadata: issuerMetadata.authorizationServers[0],\n clientAttestation: {\n ...clientAttestation,\n // First session config, fall back to global config\n required: issuanceSession.walletAttestation?.required ?? config.walletAttestationsRequired,\n\n // NOTE: we might want to enforce this? Not sure\n // ensureConfirmationKeyMatchesDpopKey: true\n },\n dpop: {\n ...dpop,\n // First session config, fall back to global config\n required: issuanceSession.dpop?.required ?? config.dpopRequired,\n },\n refreshTokenExpiresAt: parsedRefreshToken?.expiresAt,\n })\n\n await openId4VcIssuerService.verifyRefreshToken(agentContext, issuer, parsedRefreshToken, {\n dpop: verificationResult.dpop,\n })\n } else {\n throw new Oauth2ServerErrorResponseError({\n error: Oauth2ErrorCodes.UnsupportedGrantType,\n error_description: 'Unsupported grant type',\n })\n }\n\n // Do not update the session state if the grant type is refresh token. This\n // avoids the session state going \"backwards\".\n if (grant.grantType !== refreshTokenGrantIdentifier) {\n await openId4VcIssuerService.updateState(\n agentContext,\n issuanceSession,\n OpenId4VcIssuanceSessionState.AccessTokenRequested\n )\n }\n\n const { cNonce, cNonceExpiresInSeconds } = await openId4VcIssuerService.createNonce(agentContext, issuer)\n\n // for authorization code flow we take the authorization scopes. For pre-auth we don't use scopes (we just\n // use the offered credential configuration ids so a scope is not required)\n const scopes =\n grant.grantType === authorizationCodeGrantIdentifier ? issuanceSession.authorization?.scopes : undefined\n const subject = `credo:${utils.uuid()}`\n\n const tokenDpop = verificationResult.dpop\n ? {\n jwk: verificationResult.dpop?.jwk,\n }\n : undefined\n\n // Generate a refresh token if they're enabled in the config and the grant type is not refresh token\n let refreshToken: string | undefined\n if (issuanceSession.generateRefreshTokens && grant.grantType !== refreshTokenGrantIdentifier) {\n refreshToken = await openId4VcIssuerService.createRefreshToken(agentContext, issuer, {\n preAuthorizedCode: grant.grantType === preAuthorizedCodeGrantIdentifier ? grant.preAuthorizedCode : undefined,\n issuerState: issuanceSession.authorization?.issuerState,\n dpop: tokenDpop,\n })\n }\n\n const signerJwk = accessTokenSigningKey\n const accessTokenResponse = await oauth2AuthorizationServer.createAccessTokenResponse({\n audience: issuerMetadata.credentialIssuer.credential_issuer,\n authorizationServer: issuerMetadata.credentialIssuer.credential_issuer,\n expiresInSeconds: config.accessTokenExpiresInSeconds,\n signer: {\n method: 'jwk',\n alg: signerJwk.supportedSignatureAlgorithms[0],\n publicJwk: signerJwk.toJson() as Jwk,\n },\n dpop: tokenDpop,\n scope: scopes?.join(' '),\n clientId: issuanceSession.clientId,\n\n additionalAccessTokenPayload: {\n 'pre-authorized_code':\n grant.grantType === preAuthorizedCodeGrantIdentifier\n ? grant.preAuthorizedCode\n : parsedRefreshToken?.preAuthorizedCode,\n issuer_state: issuanceSession.authorization?.issuerState,\n },\n // We generate a random subject for each access token and bind the issuance session to this.\n subject,\n\n refreshToken,\n\n // NOTE: these have been removed in newer drafts. Keeping them in for now\n cNonce,\n cNonceExpiresIn: cNonceExpiresInSeconds,\n })\n\n issuanceSession.authorization = {\n ...issuanceSession.authorization,\n subject,\n }\n\n await openId4VcIssuerService.updateState(\n agentContext,\n issuanceSession,\n // Retain the current session state when refreshing the access token.\n grant.grantType === refreshTokenGrantIdentifier\n ? issuanceSession.state\n : OpenId4VcIssuanceSessionState.AccessTokenCreated\n )\n\n return sendJsonResponse(response, next, accessTokenResponse)\n } catch (error) {\n if (error instanceof Oauth2ServerErrorResponseError) {\n return sendOauth2ErrorResponse(response, next, agentContext.config.logger, error)\n }\n\n return sendUnknownServerErrorResponse(response, next, agentContext.config.logger, error)\n }\n }\n}\n"],"mappings":";;;;;;;;;;AAsBA,SAAgB,6BAA6B,QAAgB,QAAqC;AAChG,QAAO,KAAK,OAAO,yBAAyB,mBAAmB,OAAO,CAAC;;AAGzE,SAAgB,mBAAmB,QAAqC;AACtE,QAAO,OAAO,SAAmC,UAAoB,SAAuB;AAC1F,WAAS,IAAI;GAAE,iBAAiB;GAAY,QAAQ;GAAY,CAAC;EAEjE,MAAM,EAAE,cAAc,WADC,kBAAkB,QAAQ;AAGjD,MAAI;GACF,MAAM,yBAAyB,aAAa,kBAAkB,QAAQ,uBAAuB;GAC7F,MAAM,4BAA4B,aAAa,kBAAkB,QAAQ,mCAAmC;GAC5G,MAAM,iBAAiB,MAAM,uBAAuB,kBAAkB,cAAc,OAAO;GAC3F,MAAM,wBAAwB,OAAO;GACrC,IAAI,4BAA4B,uBAAuB,6BAA6B,aAAa;GAEjG,MAAM,iBAAiB,aAAa,eAAe,iBAAiB,mBAAmB,CACrF,OAAO,wBACR,CAAC;GACF,MAAM,cAAc;IAClB,SAAS,IAAI,QAAQ,QAAQ,QAAkC;IAC/D,QAAQ,QAAQ;IAChB,KAAK;IACN;GAED,MAAM,EAAE,oBAAoB,OAAO,MAAM,mBAAmB,qBAC1D,0BAA0B,wBAAwB;IAChD,oBAAoB,QAAQ;IAC5B,SAAS;IACV,CAAC;GAEJ,IAAIA;GACJ,IAAIC;GACJ,IAAIC;AAEJ,WAAQ,MAAM,WAAd;IACE,KAAK;AACH,qBAAgB,CAAC,8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