Skip to content

Commit

Permalink
feat: Add swagger Ui to the hosted context, so we have a swagger API …
Browse files Browse the repository at this point in the history
…per OID4VCI instance
  • Loading branch information
nklomp committed Feb 16, 2025
1 parent e95ad66 commit 4de300e
Show file tree
Hide file tree
Showing 36 changed files with 2,449 additions and 2,567 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"build:copyfiles": "pnpm -r --stream build:copyfiles",
"bootstrap": "lerna bootstrap",
"test:ci": "jest --config=jest.json",

"test": "jest --verbose --config=jest.json --coverage=true --detectOpenHandles",
"test:watch": "pnpm test --watch --verbose",
"test:lint": "eslint . --ext .ts",
Expand Down Expand Up @@ -66,7 +67,7 @@
"json-schema": "^0.4.0",
"lerna": "^8.1.6",
"lerna-changelog": "^2.2.0",
"nx": "^19.8.8",
"nx": "19.8.14",
"oas-resolver": "^2.5.6",
"openapi-types": "^12.1.3",
"patch-package": "^8.0.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { typeOrmDateTime } from '@sphereon/ssi-sdk.agent-config'
import { BaseEntity, Column, CreateDateColumn, Entity, PrimaryColumn, UpdateDateColumn } from 'typeorm'


@Entity('Oid4vcStateEntity')
export class Oid4vcStateEntity<StateType> extends BaseEntity {
@PrimaryColumn({ name: 'id', type: 'varchar', nullable: false })
Expand Down
5 changes: 5 additions & 0 deletions packages/data-store/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ import { PresentationDefinitionItemEntity } from './entities/presentationDefinit
import { ContactMetadataItemEntity } from './entities/contact/ContactMetadataItemEntity'
import { CredentialClaimsEntity } from './entities/issuanceBranding/CredentialClaimsEntity'

import { Oid4vcStateEntity } from './entities/oid4vcState/Oid4vcStateEntity'

export { ContactStore } from './contact/ContactStore'
export { AbstractContactStore } from './contact/AbstractContactStore'
export { AbstractDigitalCredentialStore } from './digitalCredential/AbstractDigitalCredentialStore'
Expand Down Expand Up @@ -81,6 +83,7 @@ export const DataStoreContactEntities = [
ContactMetadataItemEntity,
]

export const DataStoreOid4vcStateEntities = [Oid4vcStateEntity]
export const DataStoreIssuanceBrandingEntities = [
BackgroundAttributesEntity,
CredentialBrandingEntity,
Expand Down Expand Up @@ -113,6 +116,7 @@ export const DataStoreEntities = [
...DataStoreDigitalCredentialEntities,
...DataStoreMachineStateEntities,
...DataStorePresentationDefinitionEntities,
// ...DataStoreOid4vcStateEntities,
]

export {
Expand Down Expand Up @@ -146,4 +150,5 @@ export {
PresentationDefinitionItemEntity,
ContactMetadataItemEntity,
CredentialClaimsEntity,
Oid4vcStateEntity,
}
8 changes: 4 additions & 4 deletions packages/ebsi-support/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
},
"dependencies": {
"@ethersproject/random": "^5.7.0",
"@sphereon/did-auth-siop": "0.16.1-feature.MWALL.715.352",
"@sphereon/did-auth-siop-adapter": "0.16.1-feature.MWALL.715.352",
"@sphereon/did-auth-siop": "0.16.1-feature.MWALL.715.389",
"@sphereon/did-auth-siop-adapter": "0.16.1-feature.MWALL.715.389",
"@sphereon/pex": "5.0.0-unstable.28",
"@sphereon/pex-models": "^2.3.2",
"@sphereon/ssi-sdk-ext.did-resolver-ebsi": "0.27.1-next.14",
Expand Down Expand Up @@ -44,8 +44,8 @@
"xstate": "^4.38.3"
},
"devDependencies": {
"@sphereon/oid4vci-client": "0.16.1-feature.MWALL.715.352",
"@sphereon/oid4vci-common": "0.16.1-feature.MWALL.715.352",
"@sphereon/oid4vci-client": "0.16.1-feature.MWALL.715.389",
"@sphereon/oid4vci-common": "0.16.1-feature.MWALL.715.389",
"@sphereon/ssi-express-support": "workspace:*",
"@sphereon/ssi-sdk-ext.key-manager": "0.27.1-next.14",
"@sphereon/ssi-sdk-ext.kms-local": "0.27.1-next.14",
Expand Down
6 changes: 3 additions & 3 deletions packages/mdl-mdoc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"build:clean": "tsc --build --clean && tsc --build"
},
"dependencies": {
"@sphereon/did-auth-siop-adapter": "0.16.1-feature.MWALL.715.352",
"@sphereon/did-auth-siop-adapter": "0.16.1-feature.MWALL.715.389",
"@sphereon/kmp-mdoc-core": "0.2.0-SNAPSHOT.26",
"@sphereon/pex": "5.0.0-unstable.28",
"@sphereon/pex-models": "^2.3.2",
Expand All @@ -35,8 +35,8 @@
"uuid": "^9.0.1"
},
"devDependencies": {
"@sphereon/oid4vci-client": "0.16.1-feature.MWALL.715.352",
"@sphereon/oid4vci-common": "0.16.1-feature.MWALL.715.352",
"@sphereon/oid4vci-client": "0.16.1-feature.MWALL.715.389",
"@sphereon/oid4vci-common": "0.16.1-feature.MWALL.715.389",
"@sphereon/ssi-express-support": "workspace:*",
"@sphereon/ssi-sdk-ext.key-manager": "0.27.1-next.14",
"@sphereon/ssi-sdk-ext.kms-local": "0.27.1-next.14",
Expand Down
8 changes: 4 additions & 4 deletions packages/oid4vci-holder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
},
"dependencies": {
"@sphereon/kmp-mdoc-core": "0.2.0-SNAPSHOT.26",
"@sphereon/oid4vci-client": "0.16.1-feature.MWALL.715.352",
"@sphereon/oid4vci-common": "0.16.1-feature.MWALL.715.352",
"@sphereon/did-auth-siop": "0.16.1-feature.MWALL.715.352",
"@sphereon/oid4vci-client": "0.16.1-feature.MWALL.715.389",
"@sphereon/oid4vci-common": "0.16.1-feature.MWALL.715.389",
"@sphereon/did-auth-siop": "0.16.1-feature.MWALL.715.389",
"@sphereon/ssi-sdk-ext.did-utils": "0.27.1-next.14",
"@sphereon/ssi-sdk-ext.identifier-resolution": "0.27.1-next.14",
"@sphereon/ssi-sdk-ext.jwt-service": "0.27.1-next.14",
Expand Down Expand Up @@ -46,7 +46,7 @@
"xstate": "^4.38.3"
},
"devDependencies": {
"@sphereon/oid4vc-common": "0.16.1-feature.MWALL.715.352",
"@sphereon/oid4vc-common": "0.16.1-feature.MWALL.715.389",
"@sphereon/ssi-sdk.siopv2-oid4vp-common": "workspace:*",
"@sphereon/ssi-sdk-ext.did-resolver-jwk": "0.27.1-next.14",
"@types/i18n-js": "^3.8.9",
Expand Down
1 change: 0 additions & 1 deletion packages/oid4vci-holder/src/agent/OID4VCIHolder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1093,7 +1093,6 @@ export class OID4VCIHolder implements IAgentPlugin {
return []
}


const result = await context.agent.identifierExternalResolveByOIDFEntityId({
method: 'entity_id',
trustAnchors: trustAnchors,
Expand Down
6 changes: 4 additions & 2 deletions packages/oid4vci-issuer-rest-api/__tests__/RestAPI.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CredentialRequestJwtVc } from '@sphereon/oid4vci-common'
import { CredentialRequestJwtVcJson } from '@sphereon/oid4vci-common'
import { CredentialDataSupplier, CredentialDataSupplierArgs, CredentialDataSupplierResult } from '@sphereon/oid4vci-issuer'
import { ExpressBuilder } from '@sphereon/ssi-express-support'
import { TAgent } from '@veramo/core'
Expand Down Expand Up @@ -27,6 +27,7 @@ export function start() {
}).then((restApi) => {
console.log('REST API STARTED: ' + restApi.instance.metadataOptions.credentialIssuer)
})
/*
OID4VCIRestAPI.init({
context: { ...agent.context, agent: agent as TAgent<IPlugins> },
Expand Down Expand Up @@ -57,6 +58,7 @@ export function start() {
}).then((restApi) => {
console.log('REST API STARTED: ' + restApi.instance.metadataOptions.credentialIssuer)
})
*/

expressSupport.start()
}
Expand Down Expand Up @@ -136,7 +138,7 @@ const credentialDataSupplierSphereon: CredentialDataSupplier = (args: Credential
throw Error(`Format ${args.credentialRequest.format} is not configured on this issuer`)
}

const request = args.credentialRequest as CredentialRequestJwtVc
const request = args.credentialRequest as CredentialRequestJwtVcJson
if (request.types.includes('VerifiedEmployee')) {
return Promise.resolve({
format: 'jwt_vc_json',
Expand Down
Loading

0 comments on commit 4de300e

Please sign in to comment.