Skip to content

Commit

Permalink
chore: remove code from wrong branch
Browse files Browse the repository at this point in the history
  • Loading branch information
sanderPostma committed Feb 8, 2025
1 parent a776819 commit fc43a0c
Show file tree
Hide file tree
Showing 17 changed files with 137 additions and 160 deletions.
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.SSISDK.5.credential.offer.uri.366",
"@sphereon/did-auth-siop-adapter": "0.16.1-feature.SSISDK.5.credential.offer.uri.366",
"@sphereon/did-auth-siop": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/did-auth-siop-adapter": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/pex": "5.0.0-unstable.28",
"@sphereon/pex-models": "^2.3.2",
"@sphereon/ssi-sdk-ext.did-resolver-ebsi": "0.27.0",
Expand Down Expand Up @@ -44,8 +44,8 @@
"xstate": "^4.38.3"
},
"devDependencies": {
"@sphereon/oid4vci-client": "0.16.1-feature.SSISDK.5.credential.offer.uri.366",
"@sphereon/oid4vci-common": "0.16.1-feature.SSISDK.5.credential.offer.uri.366",
"@sphereon/oid4vci-client": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/oid4vci-common": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/ssi-express-support": "workspace:*",
"@sphereon/ssi-sdk-ext.key-manager": "0.27.0",
"@sphereon/ssi-sdk-ext.kms-local": "0.27.0",
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": "0.16.1-feature.SSISDK.5.credential.offer.uri.366",
"@sphereon/did-auth-siop": "0.16.1-feature.IATAB2B.52.355",
"@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.SSISDK.5.credential.offer.uri.366",
"@sphereon/oid4vci-common": "0.16.1-feature.SSISDK.5.credential.offer.uri.366",
"@sphereon/oid4vci-client": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/oid4vci-common": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/ssi-express-support": "workspace:*",
"@sphereon/ssi-sdk-ext.key-manager": "0.27.0",
"@sphereon/ssi-sdk-ext.kms-local": "0.27.0",
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/did-auth-siop": "0.16.1-feature.SSISDK.5.credential.offer.uri.366",
"@sphereon/oid4vci-client": "0.16.1-feature.SSISDK.5.credential.offer.uri.366",
"@sphereon/oid4vci-common": "0.16.1-feature.SSISDK.5.credential.offer.uri.366",
"@sphereon/did-auth-siop": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/oid4vci-client": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/oid4vci-common": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/ssi-sdk-ext.did-utils": "0.27.0",
"@sphereon/ssi-sdk-ext.identifier-resolution": "0.27.0",
"@sphereon/ssi-sdk-ext.jwt-service": "0.27.0",
Expand Down Expand Up @@ -45,7 +45,7 @@
"xstate": "^4.38.3"
},
"devDependencies": {
"@sphereon/oid4vc-common": "0.16.1-feature.SSISDK.5.credential.offer.uri.366",
"@sphereon/oid4vc-common": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/ssi-sdk.siopv2-oid4vp-common": "workspace:*",
"@sphereon/ssi-sdk-ext.did-resolver-jwk": "0.27.0",
"@types/i18n-js": "^3.8.9",
Expand Down
40 changes: 10 additions & 30 deletions packages/oid4vci-holder/src/link-handler/index.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
import { CredentialOfferClient } from '@sphereon/oid4vci-client'
import {
AuthorizationRequestOpts,
AuthorizationServerClientOpts,
AuthzFlowType,
convertURIToJsonObject,
decodeJsonProperties,
} from '@sphereon/oid4vci-common'
import { AuthorizationRequestOpts, AuthorizationServerClientOpts, AuthzFlowType, convertURIToJsonObject } from '@sphereon/oid4vci-common'
import { DefaultLinkPriorities, LinkHandlerAdapter } from '@sphereon/ssi-sdk.core'
import { IMachineStatePersistence, interpreterStartOrResume, SerializableState } from '@sphereon/ssi-sdk.xstate-machine-persistence'
import { IAgentContext } from '@veramo/core'
import { GetMachineArgs, IOID4VCIHolder, OID4VCIMachineEvents, OID4VCIMachineStateNavigationListener } from '../types/IOID4VCIHolder'
import {
GetMachineArgs,
IOID4VCIHolder,
OID4VCIMachineEvents,
OID4VCIMachineStateNavigationListener
} from '../types/IOID4VCIHolder'
import { FirstPartyMachineStateNavigationListener } from '../types/FirstPartyMachine'
import { fetch } from 'cross-fetch'

/**
* This handler only handles credential offer links (either by value or by reference)
Expand All @@ -26,10 +24,7 @@ export class OID4VCIHolderLinkHandler extends LinkHandlerAdapter {
private readonly trustAnchors?: Array<string>

constructor(
args: Pick<
GetMachineArgs,
'stateNavigationListener' | 'authorizationRequestOpts' | 'clientOpts' | 'trustAnchors' | 'firstPartyStateNavigationListener'
> & {
args: Pick<GetMachineArgs, 'stateNavigationListener' | 'authorizationRequestOpts' | 'clientOpts' | 'trustAnchors' | 'firstPartyStateNavigationListener'> & {
priority?: number | DefaultLinkPriorities
protocols?: Array<string | RegExp>
noStateMachinePersistence?: boolean
Expand Down Expand Up @@ -57,22 +52,7 @@ export class OID4VCIHolderLinkHandler extends LinkHandlerAdapter {
},
): Promise<void> {
const uri = new URL(url).toString()
let offerData = convertURIToJsonObject(uri) as Record<string, unknown>
if ('credential_offer_uri' in offerData) {
const credentialOfferUri = offerData['credential_offer_uri'] as string
const uri = decodeURIComponent(credentialOfferUri)
const response = await fetch(uri)
if (!(response && response.status >= 200 && response.status < 400)) {
return Promise.reject(
`the credential offer URI endpoint call was not successful. http code ${response.status} - reason ${response.statusText}`,
)
}

if (response.headers.get('Content-Type')?.startsWith('application/json') === false) {
return Promise.reject('the credential offer URI endpoint did not return content type application/json')
}
offerData = decodeJsonProperties(await response.json()) as Record<string, unknown>
}
const offerData = convertURIToJsonObject(uri) as Record<string, unknown>
const hasCode = 'code' in offerData && !!offerData.code && !('issuer' in offerData)
const code = hasCode ? (offerData.code as string) : undefined
const clientOpts = { ...this.clientOpts, ...opts?.clientOpts }
Expand All @@ -89,7 +69,7 @@ export class OID4VCIHolderLinkHandler extends LinkHandlerAdapter {
authorizationRequestOpts: { ...this.authorizationRequestOpts, ...opts?.authorizationRequestOpts },
...((clientOpts.clientId || clientOpts.clientAssertionType) && { clientOpts: clientOpts as AuthorizationServerClientOpts }),
stateNavigationListener: this.stateNavigationListener,
firstPartyStateNavigationListener: this.firstPartyStateNavigationListener,
firstPartyStateNavigationListener: this.firstPartyStateNavigationListener
})

const interpreter = oid4vciMachine.interpreter
Expand Down
6 changes: 3 additions & 3 deletions packages/oid4vci-issuer-rest-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"start:dev": "ts-node __tests__/RestAPI.ts"
},
"dependencies": {
"@sphereon/oid4vci-common": "0.16.1-feature.SSISDK.5.credential.offer.uri.366",
"@sphereon/oid4vci-issuer": "0.16.1-feature.SSISDK.5.credential.offer.uri.366",
"@sphereon/oid4vci-issuer-server": "0.16.1-feature.SSISDK.5.credential.offer.uri.366",
"@sphereon/oid4vci-common": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/oid4vci-issuer": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/oid4vci-issuer-server": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/ssi-express-support": "workspace:*",
"@sphereon/ssi-sdk-ext.identifier-resolution": "0.27.0",
"@sphereon/ssi-sdk-ext.jwt-service": "0.27.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/oid4vci-issuer-rest-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"generate-plugin-schema": "ts-node ../../packages/dev/bin/sphereon.js dev generate-plugin-schema"
},
"dependencies": {
"@sphereon/oid4vci-common": "0.16.1-feature.SSISDK.5.credential.offer.uri.366",
"@sphereon/oid4vci-common": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/ssi-types": "workspace:*",
"@veramo/core": "4.2.0",
"cross-fetch": "^3.1.8"
Expand Down
2 changes: 1 addition & 1 deletion packages/oid4vci-issuer-store/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/oid4vci-common": "0.16.1-feature.SSISDK.5.credential.offer.uri.366",
"@sphereon/oid4vci-common": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/ssi-sdk-ext.did-utils": "0.27.0",
"@sphereon/ssi-sdk-ext.identifier-resolution": "0.27.0",
"@sphereon/ssi-sdk.kv-store-temp": "workspace:*",
Expand Down
6 changes: 3 additions & 3 deletions packages/oid4vci-issuer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"build:clean": "tsc --build --clean && tsc --build"
},
"dependencies": {
"@sphereon/oid4vci-common": "0.16.1-feature.SSISDK.5.credential.offer.uri.366",
"@sphereon/oid4vci-issuer": "0.16.1-feature.SSISDK.5.credential.offer.uri.366",
"@sphereon/oid4vci-common": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/oid4vci-issuer": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/ssi-sdk-ext.did-utils": "0.27.0",
"@sphereon/ssi-sdk-ext.identifier-resolution": "0.27.0",
"@sphereon/ssi-sdk-ext.jwt-service": "0.27.0",
Expand All @@ -36,7 +36,7 @@
"uuid": "^9.0.1"
},
"devDependencies": {
"@sphereon/did-auth-siop": "0.16.1-feature.SSISDK.5.credential.offer.uri.366",
"@sphereon/did-auth-siop": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/did-uni-client": "^0.6.3",
"@veramo/did-provider-key": "4.2.0",
"@veramo/did-resolver": "4.2.0",
Expand Down
2 changes: 0 additions & 2 deletions packages/oid4vci-issuer/src/types/IOID4VCIIssuer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
CredentialConfigurationSupported,
CredentialDataSupplierInput,
CredentialIssuerMetadataOpts,
CredentialOfferPayloadMode,
CredentialOfferSession,
CredentialRequest,
CredentialResponse,
Expand Down Expand Up @@ -37,7 +36,6 @@ export interface IOID4VCIIssuerOpts {
}

export interface ICreateOfferArgs extends IIssuerInstanceArgs {
credentialOfferPayloadMode: CredentialOfferPayloadMode
grants?: Grant
credentials?: Record<string, CredentialConfigurationSupported>
credentialDefinition?: IssuerCredentialDefinition
Expand Down
2 changes: 1 addition & 1 deletion packages/siopv2-oid4vp-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"access": "public"
},
"dependencies": {
"@sphereon/did-auth-siop": "0.16.1-feature.SSISDK.5.credential.offer.uri.366",
"@sphereon/did-auth-siop": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/ssi-sdk.core": "workspace:*",
"@sphereon/ssi-types": "workspace:*",
"uint8arrays": "3.1.1"
Expand Down
6 changes: 3 additions & 3 deletions packages/siopv2-oid4vp-op-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
"build:clean": "tsc --build --clean && tsc --build"
},
"dependencies": {
"@sphereon/did-auth-siop": "0.16.1-feature.SSISDK.5.credential.offer.uri.366",
"@sphereon/did-auth-siop-adapter": "0.16.1-feature.SSISDK.5.credential.offer.uri.366",
"@sphereon/oid4vc-common": "0.16.1-feature.SSISDK.5.credential.offer.uri.366",
"@sphereon/did-auth-siop": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/did-auth-siop-adapter": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/oid4vc-common": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/pex": "5.0.0-unstable.28",
"@sphereon/pex-models": "^2.3.2",
"@sphereon/ssi-sdk-ext.did-utils": "0.27.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/siopv2-oid4vp-rp-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
"build:clean": "tsc --build --clean && tsc --build"
},
"dependencies": {
"@sphereon/did-auth-siop": "0.16.1-feature.SSISDK.5.credential.offer.uri.366",
"@sphereon/did-auth-siop-adapter": "0.16.1-feature.SSISDK.5.credential.offer.uri.366",
"@sphereon/oid4vc-common": "0.16.1-feature.SSISDK.5.credential.offer.uri.366",
"@sphereon/did-auth-siop": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/did-auth-siop-adapter": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/oid4vc-common": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/pex": "5.0.0-unstable.28",
"@sphereon/ssi-sdk-ext.did-utils": "0.27.0",
"@sphereon/ssi-sdk-ext.identifier-resolution": "0.27.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/siopv2-oid4vp-rp-rest-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"start:dev": "ts-node __tests__/RestAPI.ts"
},
"dependencies": {
"@sphereon/did-auth-siop": "0.16.1-feature.SSISDK.5.credential.offer.uri.366",
"@sphereon/did-auth-siop": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/ssi-express-support": "workspace:*",
"@sphereon/ssi-sdk.core": "workspace:*",
"@sphereon/ssi-sdk.credential-validation": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion packages/vc-status-list-issuer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"devDependencies": {
"@babel/preset-typescript": "^7.24.7",
"@sphereon/did-uni-client": "^0.6.3",
"@sphereon/oid4vci-common": "0.16.1-feature.SSISDK.5.credential.offer.uri.366",
"@sphereon/oid4vci-common": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/ssi-sdk-ext.did-provider-jwk": "0.27.0",
"@sphereon/ssi-sdk-ext.did-resolver-jwk": "0.27.0",
"@sphereon/ssi-sdk-ext.identifier-resolution": "0.27.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/vc-status-list/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@sphereon/ssi-sdk-ext.jwt-service": "0.27.0",
"@sphereon/ssi-types": "workspace:*",
"@sphereon/vc-status-list": "7.0.0-next.0",
"@sphereon/oid4vci-common": "0.16.1-feature.SSISDK.5.credential.offer.uri.366",
"@sphereon/oid4vci-common": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/kmp-cbor": "0.2.0-SNAPSHOT.25",
"@sd-jwt/core": "^0.7.2",
"@sd-jwt/sd-jwt-vc": "^0.7.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/w3c-vc-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"start:dev": "ts-node __tests__/agent.ts"
},
"dependencies": {
"@sphereon/did-auth-siop": "0.16.1-feature.SSISDK.5.credential.offer.uri.366",
"@sphereon/did-auth-siop": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/ssi-express-support": "workspace:*",
"@sphereon/ssi-sdk.agent-config": "workspace:*",
"@sphereon/ssi-sdk.core": "workspace:*",
Expand Down
Loading

0 comments on commit fc43a0c

Please sign in to comment.