Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

integrating support for SD-JWT into an RP setup #232

Open
wants to merge 112 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
ab596c8
feat: (WIP) added parameters to handle sd-jwts
sksadjad Aug 12, 2024
677a02a
feat: (WIP) integrated changes from did-auth-siop
sksadjad Aug 14, 2024
c6806fa
Merge branch 'refs/heads/develop' into feature/SPRIND-25_oid4vp_rp
sksadjad Aug 14, 2024
a700b4a
fix: (WIP) fixes after merge
sksadjad Aug 14, 2024
4091f2d
fix: build fix
sksadjad Aug 14, 2024
65f772c
fix: further fixes, brought back the wellknown-dids and added hasher …
sksadjad Aug 14, 2024
7c54040
fix: fixed ternary function for getting the audience value in the jwt…
sksadjad Aug 15, 2024
72914c1
feat: added callback functions for signcallbacks in siopv2-oid4vp-op-…
sksadjad Aug 15, 2024
13def79
fix: updated IVerifySdJwtPresentationResult in the sd-jwt module to b…
sksadjad Aug 15, 2024
7e1857f
chore: added todo for verifydidjwt calls in siopv2-oid4vp libs
sksadjad Aug 15, 2024
30bc230
fix: fixed signCallback functions in siopv2-oid4vp libs
sksadjad Aug 16, 2024
dbaa208
feature: (WIP) added sd-jwt presentation creation logic in siopv2-oid…
sksadjad Aug 16, 2024
1b2c882
feature: added sdjwt presentation sign callback to oid4vp in siopv2-o…
sksadjad Aug 16, 2024
475034a
fix: reverted sd-jwt presentation callback from OID4VP as it is handl…
sksadjad Aug 20, 2024
84711f0
chore: reverted the verifyDidJWT calls and for now, returning true. a…
sksadjad Aug 21, 2024
438312c
chore: removed a comment
sksadjad Aug 21, 2024
c8b79a0
chore: removed optional kid in the signCallback
sksadjad Aug 21, 2024
d0ef902
Merge branch 'refs/heads/develop' into feature/SPRIND-25_oid4vp_rp
sksadjad Aug 21, 2024
c252140
fix: fixed import in IContactManager
sksadjad Aug 21, 2024
e11b80f
fix: updated the dependencies and their references to fix issues with…
sksadjad Aug 22, 2024
8993b74
fix: updated the dependencies to fix issues with oid4vci modules
sksadjad Aug 22, 2024
2f513dd
fix: updated the ssi-sdk-ext dependencies of key-hosting
sksadjad Aug 22, 2024
c41f87d
fix: updated the ssi-sdk-ext dependencies of vc-handler-ld-local
sksadjad Aug 22, 2024
30efe24
fix: updated the ssi-sdk-ext dependencies of vc-status-list
sksadjad Aug 22, 2024
d8b92a2
chore: reverted the crypto-extensions version updates
sksadjad Aug 22, 2024
3c35e4c
chore: updated signCallback for siop-oid4vp packages and removed unne…
sksadjad Aug 22, 2024
5383e26
Merge branch 'refs/heads/develop' into feature/SPRIND-25_oid4vp_rp
sksadjad Aug 22, 2024
823c605
chore: fixes after merging with develop
sksadjad Aug 22, 2024
3d39426
fix: Updates to KMP libs
nklomp Aug 22, 2024
186815b
chore: updated version for oid4vc libraries
sksadjad Aug 22, 2024
4dcffd6
Merge remote-tracking branch 'origin/feature/SPRIND-25_oid4vp_rp' int…
sksadjad Aug 22, 2024
2ae7fd9
chore: updated lock file
sksadjad Aug 22, 2024
cb355a0
Merge remote-tracking branch 'origin/feature/sprind-36_jwt_service' i…
nklomp Aug 22, 2024
a9c00c4
chore: Update locks
nklomp Aug 22, 2024
305fc74
feat: Add mso_mdoc and sd-jwt to prefered formats
nklomp Aug 22, 2024
baec19d
feat: Add mso_mdoc and sd-jwt to prefered formats
nklomp Aug 22, 2024
d03be06
chore: Update vci to correct version
nklomp Aug 22, 2024
c41a3ae
fix: Fix holder service after VCI update
nklomp Aug 22, 2024
1acd1e0
fix: more fixes for DID assumptions
nklomp Aug 22, 2024
70bce1f
fix: fix incorrect imports
nklomp Aug 22, 2024
cb94b80
fix: determine binding method and proof types wasn't working correctl…
nklomp Aug 22, 2024
bd2a101
fix: make sure we send a jwk to the vci lib in case we are in jwk ide…
nklomp Aug 22, 2024
9d78549
fix: make sure we send a jwk to the vci lib in case we are in jwk ide…
nklomp Aug 23, 2024
ac0e208
fix: prefer type to id when making the cred request
nklomp Aug 23, 2024
797f966
fix: prefer type to id when making the cred request
nklomp Aug 23, 2024
bed44f4
fix: hasher missing when mapping credential
nklomp Aug 23, 2024
e9dc5df
feat: Ensure we use lazy identifier resolution everywhere
nklomp Aug 23, 2024
fc5c721
fix: Make sure we update issuance opts with the resolved identifier
nklomp Aug 23, 2024
81341ef
chore: Misc fixes
nklomp Aug 23, 2024
ecb19b7
chore: fix identifier passing in issuance opts
nklomp Aug 23, 2024
f41be93
feat: Add support to provide trust anchors to verify certiticate chai…
nklomp Aug 23, 2024
d626a9d
chore: CA config fixes
nklomp Aug 23, 2024
25dda34
feat: certificate info and subject alternative names
nklomp Aug 24, 2024
08b9caf
chore: Contact handling improvements for non DID use cases
nklomp Aug 24, 2024
04d91fe
feat: expose generic verification types we use elsewhere as well
nklomp Aug 24, 2024
81da6e6
chore: rename validation results because of name clash
nklomp Aug 24, 2024
c4745bb
feat: Add cose and jose types to ssi-types, so we can use them everyw…
nklomp Aug 24, 2024
bc99d37
chore: Also expose the jose enums as unions to make it easy for exist…
nklomp Aug 24, 2024
0adbc32
chore: update deps
nklomp Aug 24, 2024
f74605a
fix: SD-JWt verification fix for new result
nklomp Aug 25, 2024
7bb6158
feat: SD-JWT uses jwt-service by default. Also no need for crypto and…
nklomp Aug 25, 2024
70b6cfc
chore: Update locks
nklomp Aug 25, 2024
0eee3aa
fix: OID4VP verification changes
nklomp Aug 25, 2024
cc19227
fix: Allow for 1 sec skew in test for VCs
nklomp Aug 25, 2024
694fa88
chore: update locks
nklomp Aug 25, 2024
c8ac82a
chore: fix skew time test. They weren't failing because the skewtime …
nklomp Aug 25, 2024
c0d6ab2
chore: RP fixes
nklomp Aug 25, 2024
9614e7b
chore: VCI holder fixes
nklomp Aug 26, 2024
4bb0819
fix: Digital credential store (parsing) fixes
nklomp Aug 26, 2024
cb0285b
feat: Mdoc presentation test
nklomp Aug 26, 2024
5025dd7
chore: RPInstance JwtIssuer support
sanderPostma Aug 26, 2024
9706e43
chore: kmsKeyRef fix
sanderPostma Aug 26, 2024
6de5bc3
feat: Mdoc holder presentation and RP verification methods in SDK
nklomp Aug 27, 2024
2436799
Merge remote-tracking branch 'origin/feature/SPRIND-25_oid4vp_rp' int…
nklomp Aug 27, 2024
0cf8dbc
chore: oid4vci deps fixes
sanderPostma Aug 27, 2024
d4ab212
Merge branch 'feature/SPRIND-25_oid4vp_rp' of https://github.com/Sphe…
sanderPostma Aug 27, 2024
3b88e47
chore: lockfile
sanderPostma Aug 27, 2024
d2fb3ed
feat: Uniform credential mapping for mdocs
nklomp Aug 27, 2024
ab15f75
Merge remote-tracking branch 'origin/feature/SPRIND-25_oid4vp_rp' int…
nklomp Aug 27, 2024
993c12b
chore: added kmsKeyRef & identifierMethod to DigitalCredential
sanderPostma Aug 27, 2024
2d5f6ee
Merge branch 'feature/SPRIND-25_oid4vp_rp' of https://github.com/Sphe…
sanderPostma Aug 27, 2024
e7433af
chore: disabled broken test FIXME
sanderPostma Aug 27, 2024
a483255
chore: fixed missing keyRef & identifierMethod fields
sanderPostma Aug 27, 2024
cbaf1c5
chore: implement stored kmsKeyRef & identifierMethod
sanderPostma Aug 28, 2024
a7c3de1
chore: RP send JwtIssuer
sanderPostma Aug 28, 2024
d06d6bf
chore: oid4vci update
sanderPostma Aug 28, 2024
138daac
chore: lockfile
sanderPostma Aug 28, 2024
a1923b7
chore: provider hasher to mergedPayloads
sanderPostma Aug 28, 2024
4f4c23f
chore: OID4VC version bump
sanderPostma Aug 28, 2024
1d45410
chore: OID4VC version bump
sanderPostma Aug 28, 2024
15ff2d0
chore: disabled The current version of SIOP-OID4VP we use only works …
sanderPostma Aug 28, 2024
fbb2c80
chore: allow passing in a new nonce to the sign callback
nklomp Aug 28, 2024
c4273cd
Merge remote-tracking branch 'origin/feature/SPRIND-25_uniqueDC' into…
nklomp Aug 28, 2024
ee9bf6f
chore: credential store improvements
nklomp Aug 29, 2024
bf0a090
chore: credential mapper more resilient
nklomp Aug 29, 2024
5ffdfb1
chore: credential mapper more resilient
nklomp Aug 29, 2024
a460805
chore: credential mapper more resilient
nklomp Aug 29, 2024
7149572
chore: update PEX version
nklomp Aug 29, 2024
d5e64a2
chore: update versions
nklomp Aug 29, 2024
0e5b129
chore: added withClientIdScheme to RequestObjectPayload
sanderPostma Aug 29, 2024
8cdc9a2
Merge branch 'feature/SPRIND-25_oid4vp_rp' of https://github.com/Sphe…
sanderPostma Aug 29, 2024
fc597f3
chore: added withClientIdScheme to RequestObjectPayload
sanderPostma Aug 29, 2024
66721fc
chore: added withClientIdScheme to RequestObjectPayload
sanderPostma Aug 29, 2024
32b588f
feat: Also expose DID Document types in ssi-types
nklomp Aug 30, 2024
005c00c
Merge remote-tracking branch 'origin/feature/SPRIND-25_oid4vp_rp' int…
nklomp Aug 30, 2024
680bfed
chore: update deps
nklomp Aug 30, 2024
25e0933
chore: update deps
nklomp Aug 31, 2024
82e2a1b
feat: Allow to override signers for specific identifiers or the defau…
nklomp Aug 31, 2024
88b2693
chore: make sure default signer is a function if we return it
nklomp Aug 31, 2024
76768f9
chore: call mdocOid4vpRPVerify for MsoMdoc
sanderPostma Sep 2, 2024
e905e3f
chore: fixed uniformVerifiablePresentation type
sanderPostma Sep 3, 2024
809e40a
chore: oid4vc latest version
sanderPostma Sep 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/contact-manager/src/types/IContactManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
PartyTypeType as ContactTypeType,
PhysicalAddress,
} from '@sphereon/ssi-sdk.data-store'
import { contextHasPlugin } from '../../../agent-config/src/agentContextUtils'
import { contextHasPlugin } from '@sphereon/ssi-sdk.agent-config'

export interface IContactManager extends IPluginMethodMap {
cmGetContact(args: GetContactArgs, context: RequiredContext): Promise<Contact>
Expand Down
4 changes: 2 additions & 2 deletions packages/data-store/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
},
"dependencies": {
"@sphereon/pex": "^4.0.1",
"@sphereon/ssi-sdk-ext.did-utils": "0.24.1-unstable.82",
"@sphereon/ssi-sdk-ext.identifier-resolution": "0.24.1-unstable.82",
"@sphereon/ssi-sdk-ext.did-utils": "0.24.1-next.96",
"@sphereon/ssi-sdk-ext.identifier-resolution": "0.24.1-next.96",
"@sphereon/ssi-sdk.agent-config": "workspace:*",
"@sphereon/ssi-sdk.core": "workspace:*",
"@sphereon/ssi-types": "workspace:*",
Expand Down
19 changes: 10 additions & 9 deletions packages/ebsi-support/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@
},
"dependencies": {
"@ethersproject/random": "^5.7.0",
"@sphereon/did-auth-siop": "0.6.4",
"@sphereon/did-auth-siop": "0.16.1-next.13",
"@sphereon/did-auth-siop-adapter": "0.16.1-next.13",
"@sphereon/pex": "^4.0.1",
"@sphereon/pex-models": "^2.2.4",
"@sphereon/ssi-sdk-ext.did-resolver-ebsi": "0.24.1-unstable.82",
"@sphereon/ssi-sdk-ext.did-utils": "0.24.1-unstable.82",
"@sphereon/ssi-sdk-ext.key-utils": "0.24.1-unstable.82",
"@sphereon/ssi-sdk-ext.identifier-resolution": "0.24.1-unstable.82",
"@sphereon/ssi-sdk-ext.did-resolver-ebsi": "0.24.1-next.96",
"@sphereon/ssi-sdk-ext.did-utils": "0.24.1-next.96",
"@sphereon/ssi-sdk-ext.key-utils": "0.24.1-next.96",
"@sphereon/ssi-sdk-ext.identifier-resolution": "0.24.1-next.96",
"@sphereon/ssi-sdk.contact-manager": "workspace:*",
"@sphereon/ssi-sdk.core": "workspace:*",
"@sphereon/ssi-sdk.oid4vci-holder": "workspace:*",
Expand All @@ -42,11 +43,11 @@
"xstate": "^4.38.3"
},
"devDependencies": {
"@sphereon/oid4vci-client": "0.16.1-next.7",
"@sphereon/oid4vci-common": "0.16.1-next.7",
"@sphereon/oid4vci-client": "0.16.1-next.13",
"@sphereon/oid4vci-common": "0.16.1-next.13",
"@sphereon/ssi-express-support": "workspace:*",
"@sphereon/ssi-sdk-ext.key-manager": "0.24.1-unstable.82",
"@sphereon/ssi-sdk-ext.kms-local": "0.24.1-unstable.82",
"@sphereon/ssi-sdk-ext.key-manager": "0.24.1-next.96",
"@sphereon/ssi-sdk-ext.kms-local": "0.24.1-next.96",
"@sphereon/ssi-sdk.agent-config": "workspace:*",
"@sphereon/ssi-sdk.data-store": "workspace:*",
"@sphereon/ssi-sdk.public-key-hosting": "workspace:*",
Expand Down
7 changes: 4 additions & 3 deletions packages/ebsi-support/src/agent/EbsiSupport.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CheckLinkedDomain, PresentationDefinitionLocation, PresentationDefinitionWithLocation, SupportedVersion } from '@sphereon/did-auth-siop'
import { PresentationDefinitionLocation, PresentationDefinitionWithLocation, SupportedVersion } from '@sphereon/did-auth-siop'
import { CreateRequestObjectMode } from '@sphereon/oid4vci-common'
import { IPEXFilterResult } from '@sphereon/ssi-sdk.presentation-exchange'
import { CredentialMapper, PresentationSubmission } from '@sphereon/ssi-types'
Expand Down Expand Up @@ -29,6 +29,7 @@ import {
} from '../types/IEbsiSupport'

import { v4 } from 'uuid'
import { CheckLinkedDomain } from '@sphereon/did-auth-siop-adapter'

export const ebsiSupportMethods: Array<string> = [
'ebsiCreateDidOnLedger',
Expand Down Expand Up @@ -201,13 +202,13 @@ export class EbsiSupport implements IAgentPlugin {
op: { checkLinkedDomains: CheckLinkedDomain.NEVER },
providedPresentationDefinitions: [definition],
})
const oid4vp = await opSession.getOID4VP({ allDIDs: [identifier.did] })
const oid4vp = await opSession.getOID4VP({ allIdentifiers: [identifier.did] })
const vp = await oid4vp.createVerifiablePresentation(
args.credentialRole,
{ definition, credentials: pexResult.filteredCredentials },
{
proofOpts: { domain: openIDMetadata.issuer, nonce: v4(), created: new Date(Date.now() - 120_000).toString() },
holderDID: identifier.did,
holder: identifier.did,
idOpts: idOpts,
skipDidResolution,
forceNoCredentialsInVP: !hasInputDescriptors,
Expand Down
2 changes: 2 additions & 0 deletions packages/ebsi-support/src/functions/Attestation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ export const ebsiCreateAttestationAuthRequestURL = async (
},
accessTokenOpts: {
clientOpts: {
//fixme: fix this: TS2551: Property ES384 does not exist on type typeof Alg. Did you mean PS384?
//@ts-ignore
alg: Alg[await signatureAlgorithmFromKey({ key: authKey })],
clientId,
kid,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { decodeUriAsJson } from '@sphereon/did-auth-siop'
import { getIssuerName } from '@sphereon/oid4vci-common'
import { AuthorizationServerMetadata, CredentialIssuerMetadata, getIssuerName, IssuerMetadata } from '@sphereon/oid4vci-common'
import {
ConnectionType,
CorrelationIdentifierType,
Expand Down Expand Up @@ -28,7 +28,11 @@ export const addContactCallback = (context: IRequiredContext) => {

const issuerUrl: URL = new URL(serverMetadata.issuer)
const correlationId: string = `${issuerUrl.protocol}//${issuerUrl.hostname}`
let issuerName: string = getIssuerName(correlationId, serverMetadata.credentialIssuerMetadata)
let issuerName: string = getIssuerName(
correlationId,
//fixme: we should be able remove the as part here.
serverMetadata.credentialIssuerMetadata as Partial<AuthorizationServerMetadata> & (IssuerMetadata | CredentialIssuerMetadata),
)

const party: NonPersistedParty = {
contact: {
Expand Down
12 changes: 6 additions & 6 deletions packages/oid4vci-holder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
"build:clean": "tsc --build --clean && tsc --build"
},
"dependencies": {
"@sphereon/oid4vci-client": "0.16.1-next.7",
"@sphereon/oid4vci-common": "0.16.1-next.7",
"@sphereon/ssi-sdk-ext.did-utils": "0.24.1-unstable.82",
"@sphereon/ssi-sdk-ext.key-utils": "0.24.1-unstable.82",
"@sphereon/ssi-sdk-ext.identifier-resolution": "0.24.1-unstable.82",
"@sphereon/oid4vci-client": "0.16.1-next.13",
"@sphereon/oid4vci-common": "0.16.1-next.13",
"@sphereon/ssi-sdk-ext.did-utils": "0.24.1-next.96",
"@sphereon/ssi-sdk-ext.key-utils": "0.24.1-next.96",
"@sphereon/ssi-sdk-ext.identifier-resolution": "0.24.1-next.96",
"@sphereon/ssi-sdk.contact-manager": "workspace:*",
"@sphereon/ssi-sdk.core": "workspace:*",
"@sphereon/ssi-sdk.credential-store": "workspace:*",
Expand All @@ -36,7 +36,7 @@
"xstate": "^4.38.3"
},
"devDependencies": {
"@sphereon/ssi-sdk-ext.did-resolver-jwk": "0.24.1-unstable.82",
"@sphereon/ssi-sdk-ext.did-resolver-jwk": "0.24.1-next.96",
"@types/i18n-js": "^3.8.9",
"@types/lodash.memoize": "^4.1.9",
"@types/uuid": "^9.0.8",
Expand Down
12 changes: 6 additions & 6 deletions packages/oid4vci-holder/src/agent/OID4VCIHolder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
} from '@sphereon/oid4vci-common'
import { signDidJWT, SupportedDidMethodEnum } from '@sphereon/ssi-sdk-ext.did-utils'
import { IIdentifierResolution, isManagedIdentifierDidResult, ManagedIdentifierOpts } from '@sphereon/ssi-sdk-ext.identifier-resolution'
import { SignatureAlgorithmEnum, signatureAlgorithmFromKey } from '@sphereon/ssi-sdk-ext.key-utils'
import { signatureAlgorithmFromKey, SignatureAlgorithmJwa } from '@sphereon/ssi-sdk-ext.key-utils'
import {
CorrelationIdentifierType,
CredentialCorrelationType,
Expand Down Expand Up @@ -211,10 +211,10 @@ export class OID4VCIHolder implements IAgentPlugin {
SupportedDidMethodEnum.DID_EBSI,
SupportedDidMethodEnum.DID_ION,
]
private readonly jwtCryptographicSuitePreferences: Array<SignatureAlgorithmEnum> = [
SignatureAlgorithmEnum.ES256,
SignatureAlgorithmEnum.ES256K,
SignatureAlgorithmEnum.EdDSA,
private readonly jwtCryptographicSuitePreferences: Array<SignatureAlgorithmJwa> = [
SignatureAlgorithmJwa.ES256,
SignatureAlgorithmJwa.ES256K,
SignatureAlgorithmJwa.EdDSA,
]
private static readonly DEFAULT_MOBILE_REDIRECT_URI = `${DefaultURISchemes.CREDENTIAL_OFFER}://`
private readonly defaultAuthorizationRequestOpts: AuthorizationRequestOpts = { redirectUri: OID4VCIHolder.DEFAULT_MOBILE_REDIRECT_URI }
Expand Down Expand Up @@ -595,7 +595,7 @@ export class OID4VCIHolder implements IAgentPlugin {
const idOpts = await getIdentifierOpts({ issuanceOpt, context })
const { key, kid } = idOpts
logger.debug(`ID opts`, idOpts)
const alg: SignatureAlgorithmEnum = await signatureAlgorithmFromKey({ key })
const alg: SignatureAlgorithmJwa = await signatureAlgorithmFromKey({ key })

const callbacks: ProofOfPossessionCallbacks<never> = {
signCallback: signCallback(client, idOpts, context),
Expand Down
16 changes: 9 additions & 7 deletions packages/oid4vci-holder/src/agent/OID4VCIHolderService.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import { LOG } from '@sphereon/oid4vci-client/dist/types'
import {
CredentialConfigurationSupported,
CredentialOfferFormat,
CredentialResponse,
CredentialsSupportedDisplay,
getSupportedCredentials,
getTypesFromCredentialSupported,
getTypesFromObject,
MetadataDisplay,
OpenId4VCIVersion,
CredentialOfferFormatV1_0_11,
} from '@sphereon/oid4vci-common'
import { KeyUse } from '@sphereon/ssi-sdk-ext.did-resolver-jwk'
import { getAuthenticationKey, getOrCreatePrimaryIdentifier, SupportedDidMethodEnum } from '@sphereon/ssi-sdk-ext.did-utils'
import { keyTypeFromCryptographicSuite, SignatureAlgorithmEnum } from '@sphereon/ssi-sdk-ext.key-utils'
import { keyTypeFromCryptographicSuite, SignatureAlgorithmJwa } from '@sphereon/ssi-sdk-ext.key-utils'
import { IBasicCredentialLocaleBranding, IBasicIssuerLocaleBranding } from '@sphereon/ssi-sdk.data-store'
import {
CredentialMapper,
Expand Down Expand Up @@ -107,7 +107,9 @@ export const getCredentialConfigsBasedOnFormatPref = async (
return prefConfigs
}

export const selectCredentialLocaleBranding = async (args: SelectAppLocaleBrandingArgs): Promise<IBasicCredentialLocaleBranding | IBasicIssuerLocaleBranding | undefined> => {
export const selectCredentialLocaleBranding = async (
args: SelectAppLocaleBrandingArgs,
): Promise<IBasicCredentialLocaleBranding | IBasicIssuerLocaleBranding | undefined> => {
const { locale, localeBranding } = args

return localeBranding?.find(
Expand Down Expand Up @@ -397,8 +399,8 @@ export const getCredentialConfigsSupportedBySingleTypeOrId = async (
'credentials' in client.credentialOffer.credential_offer
) {
format = client.credentialOffer.credential_offer.credentials
.filter((format: string | CredentialOfferFormat): boolean => typeof format !== 'string')
.map((format: string | CredentialOfferFormat) => (format as CredentialOfferFormat).format)
.filter((format: string | CredentialOfferFormatV1_0_11): boolean => typeof format !== 'string')
.map((format: string | CredentialOfferFormatV1_0_11) => (format as CredentialOfferFormatV1_0_11).format)
if (format?.length === 0) {
format = undefined // Otherwise we would match nothing
}
Expand Down Expand Up @@ -554,14 +556,14 @@ export const getIssuanceCryptoSuite = async (opts: GetIssuanceCryptoSuiteArgs):
case 'jwt':
case 'jwt_vc_json':
case 'jwt_vc': {
const supportedPreferences: Array<SignatureAlgorithmEnum> = jwtCryptographicSuitePreferences.filter((suite: SignatureAlgorithmEnum) =>
const supportedPreferences: Array<SignatureAlgorithmJwa> = jwtCryptographicSuitePreferences.filter((suite: SignatureAlgorithmJwa) =>
signing_algs_supported.includes(suite),
)

if (supportedPreferences.length > 0) {
return supportedPreferences[0]
} else if (client.isEBSI()) {
return SignatureAlgorithmEnum.ES256
return SignatureAlgorithmJwa.ES256
}

// if we cannot find supported cryptographic suites, we just try with the first preference
Expand Down
8 changes: 4 additions & 4 deletions packages/oid4vci-holder/src/types/IOID4VCIHolder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
} from '@sphereon/oid4vci-common'
import { CreateOrGetIdentifierOpts, IdentifierProviderOpts, KeyManagementSystemEnum, SupportedDidMethodEnum } from '@sphereon/ssi-sdk-ext.did-utils'
import { IIdentifierResolution } from '@sphereon/ssi-sdk-ext.identifier-resolution'
import { SignatureAlgorithmEnum } from '@sphereon/ssi-sdk-ext.key-utils'
import { SignatureAlgorithmJwa } from '@sphereon/ssi-sdk-ext.key-utils'
import { IContactManager } from '@sphereon/ssi-sdk.contact-manager'
import { DigitalCredential, IBasicCredentialLocaleBranding, IBasicIssuerLocaleBranding, Identity, Party } from '@sphereon/ssi-sdk.data-store'
import { IIssuanceBranding } from '@sphereon/ssi-sdk.issuance-branding'
Expand Down Expand Up @@ -79,7 +79,7 @@ export type OID4VCIHolderOptions = {
jsonldCryptographicSuitePreferences?: Array<string>
defaultAuthorizationRequestOptions?: AuthorizationRequestOpts
didMethodPreferences?: Array<SupportedDidMethodEnum>
jwtCryptographicSuitePreferences?: Array<SignatureAlgorithmEnum>
jwtCryptographicSuitePreferences?: Array<SignatureAlgorithmJwa>
hasher?: Hasher
}

Expand Down Expand Up @@ -533,7 +533,7 @@ export type GetIssuanceOptsArgs = {
serverMetadata: EndpointMetadataResult
context: RequiredContext
didMethodPreferences: Array<SupportedDidMethodEnum>
jwtCryptographicSuitePreferences: Array<SignatureAlgorithmEnum>
jwtCryptographicSuitePreferences: Array<SignatureAlgorithmJwa>
jsonldCryptographicSuitePreferences: Array<string>
forceIssuanceOpt?: IssuanceOpts
}
Expand All @@ -547,7 +547,7 @@ export type GetIssuanceDidMethodArgs = {
export type GetIssuanceCryptoSuiteArgs = {
credentialSupported: CredentialConfigurationSupported
client: OpenID4VCIClient
jwtCryptographicSuitePreferences: Array<SignatureAlgorithmEnum>
jwtCryptographicSuitePreferences: Array<SignatureAlgorithmJwa>
jsonldCryptographicSuitePreferences: Array<string>
}

Expand Down
16 changes: 8 additions & 8 deletions packages/oid4vci-issuer-rest-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
"start:dev": "ts-node __tests__/RestAPI.ts"
},
"dependencies": {
"@sphereon/oid4vci-common": "0.16.1-next.7",
"@sphereon/oid4vci-issuer": "0.16.1-next.7",
"@sphereon/oid4vci-issuer-server": "0.16.1-next.7",
"@sphereon/ssi-sdk-ext.identifier-resolution": "0.24.1-unstable.82",
"@sphereon/oid4vci-common": "0.16.1-next.13",
"@sphereon/oid4vci-issuer": "0.16.1-next.13",
"@sphereon/oid4vci-issuer-server": "0.16.1-next.13",
"@sphereon/ssi-sdk-ext.identifier-resolution": "0.24.1-next.96",
"@sphereon/ssi-express-support": "workspace:*",
"@sphereon/ssi-sdk.kv-store-temp": "workspace:*",
"@sphereon/ssi-sdk.oid4vci-issuer": "workspace:*",
Expand All @@ -37,10 +37,10 @@
"@sphereon/did-uni-client": "^0.6.3",
"@sphereon/pex": "^4.0.1",
"@sphereon/pex-models": "^2.2.4",
"@sphereon/ssi-sdk-ext.did-provider-jwk": "0.24.1-unstable.82",
"@sphereon/ssi-sdk-ext.key-manager": "0.24.1-unstable.82",
"@sphereon/ssi-sdk-ext.key-utils": "0.24.1-unstable.82",
"@sphereon/ssi-sdk-ext.kms-local": "0.24.1-unstable.82",
"@sphereon/ssi-sdk-ext.did-provider-jwk": "0.24.1-next.96",
"@sphereon/ssi-sdk-ext.key-manager": "0.24.1-next.96",
"@sphereon/ssi-sdk-ext.key-utils": "0.24.1-next.96",
"@sphereon/ssi-sdk-ext.kms-local": "0.24.1-next.96",
"@sphereon/ssi-sdk.data-store": "workspace:*",
"@sphereon/ssi-sdk.vc-handler-ld-local": "workspace:*",
"@types/body-parser": "^1.19.5",
Expand Down
8 changes: 4 additions & 4 deletions packages/oid4vci-issuer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
"build:clean": "tsc --build --clean && tsc --build"
},
"dependencies": {
"@sphereon/oid4vci-common": "0.16.1-next.7",
"@sphereon/oid4vci-issuer": "0.16.1-next.7",
"@sphereon/ssi-sdk-ext.did-utils": "0.24.1-unstable.82",
"@sphereon/ssi-sdk-ext.identifier-resolution": "0.24.1-unstable.82",
"@sphereon/oid4vci-common": "0.16.1-next.13",
"@sphereon/oid4vci-issuer": "0.16.1-next.13",
"@sphereon/ssi-sdk-ext.did-utils": "0.24.1-next.96",
"@sphereon/ssi-sdk-ext.identifier-resolution": "0.24.1-next.96",
"@sphereon/ssi-sdk.core": "workspace:*",
"@sphereon/ssi-sdk.kv-store-temp": "workspace:*",
"@sphereon/ssi-sdk.oid4vci-issuer-store": "workspace:*",
Expand Down
4 changes: 2 additions & 2 deletions packages/presentation-exchange/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"dependencies": {
"@sphereon/pex": "^4.0.1",
"@sphereon/pex-models": "^2.2.4",
"@sphereon/ssi-sdk-ext.did-utils": "0.24.1-unstable.82",
"@sphereon/ssi-sdk-ext.identifier-resolution": "0.24.1-unstable.82",
"@sphereon/ssi-sdk-ext.did-utils": "0.24.1-next.96",
"@sphereon/ssi-sdk-ext.identifier-resolution": "0.24.1-next.96",
"@sphereon/ssi-sdk.credential-store": "workspace:*",
"@sphereon/ssi-sdk.data-store": "workspace:*",
"@sphereon/ssi-sdk.sd-jwt": "workspace:*",
Expand Down
12 changes: 6 additions & 6 deletions packages/public-key-hosting/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
},
"dependencies": {
"@sphereon/ssi-express-support": "workspace:*",
"@sphereon/ssi-sdk-ext.identifier-resolution": "0.24.1-unstable.82",
"@sphereon/ssi-sdk-ext.key-manager": "0.24.1-unstable.82",
"@sphereon/ssi-sdk-ext.key-utils": "0.24.1-unstable.82",
"@sphereon/ssi-sdk-ext.kms-local": "0.24.1-unstable.82",
"@sphereon/ssi-sdk-ext.identifier-resolution": "0.24.1-next.96",
"@sphereon/ssi-sdk-ext.key-manager": "0.24.1-next.96",
"@sphereon/ssi-sdk-ext.key-utils": "0.24.1-next.96",
"@sphereon/ssi-sdk-ext.kms-local": "0.24.1-next.96",
"@sphereon/ssi-sdk.core": "workspace:*",
"@sphereon/ssi-types": "workspace:*",
"@veramo/core": "4.2.0",
Expand All @@ -33,8 +33,8 @@
"uuid": "^9.0.1"
},
"devDependencies": {
"@sphereon/ssi-sdk-ext.did-provider-jwk": "0.24.1-unstable.82",
"@sphereon/ssi-sdk-ext.did-resolver-jwk": "0.24.1-unstable.82",
"@sphereon/ssi-sdk-ext.did-provider-jwk": "0.24.1-next.96",
"@sphereon/ssi-sdk-ext.did-resolver-jwk": "0.24.1-next.96",
"@sphereon/ssi-sdk.agent-config": "workspace:*",
"@types/body-parser": "^1.19.5",
"@types/cookie-parser": "^1.4.7",
Expand Down
8 changes: 4 additions & 4 deletions packages/sd-jwt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
"@sd-jwt/decode": "^0.6.1",
"@sd-jwt/types": "^0.6.1",
"@sd-jwt/utils": "^0.6.1",
"@sphereon/ssi-sdk-ext.did-provider-jwk": "0.24.1-unstable.82",
"@sphereon/ssi-sdk-ext.did-resolver-jwk": "0.24.1-unstable.82",
"@sphereon/ssi-sdk-ext.key-manager": "0.24.1-unstable.82",
"@sphereon/ssi-sdk-ext.kms-local": "0.24.1-unstable.82",
"@sphereon/ssi-sdk-ext.did-provider-jwk": "0.24.1-next.96",
"@sphereon/ssi-sdk-ext.did-resolver-jwk": "0.24.1-next.96",
"@sphereon/ssi-sdk-ext.key-manager": "0.24.1-next.96",
"@sphereon/ssi-sdk-ext.kms-local": "0.24.1-next.96",
"@types/node": "18.15.3",
"@veramo/core": "4.2.0",
"@veramo/data-store": "4.2.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/sd-jwt/src/__tests__/sd-jwt.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ describe('Agent plugin', () => {
kb: true,
})
expect(result).toBeDefined()
expect((result.verifiedPayloads.payload as typeof claims).given_name).toBe('John')
expect((result.payload as typeof claims).given_name).toBe('John')
})

it('verify a presentation with sub set', async () => {
Expand Down Expand Up @@ -316,6 +316,6 @@ describe('Agent plugin', () => {
kb: true,
})
expect(result).toBeDefined()
expect((result.verifiedPayloads.payload as typeof claims).given_name).toBe('John')
expect((result.payload as typeof claims).given_name).toBe('John')
})
})
Loading