Skip to content

Commit

Permalink
fix: VCI did resolution from agent
Browse files Browse the repository at this point in the history
  • Loading branch information
nklomp committed Jul 7, 2023
1 parent 2c913db commit 7aa2bd3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/oid4vci-issuer/src/functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import { IIssuerOptions, IRequiredContext } from './types/IOID4VCIIssuer'
export function getJwtVerifyCallback({ verifyOpts }: { verifyOpts?: JWTVerifyOptions }, _context: IRequiredContext) {
return async (args: { jwt: string; kid?: string }): Promise<JwtVerifyResult<DIDDocument>> => {
const resolver = getAgentResolver(_context, {uniresolverFallback: true})
verifyOpts = {...verifyOpts}
if (!verifyOpts?.resolver) {
verifyOpts = {...verifyOpts, resolver: verifyOpts?.resolver} // Resolver seperately as that is a function
if (!verifyOpts?.resolver || typeof verifyOpts?.resolver?.resolve !== 'function') {
verifyOpts.resolver = resolver
}
const result = await verifyJWT(args.jwt, verifyOpts)
Expand Down

0 comments on commit 7aa2bd3

Please sign in to comment.