Skip to content

Commit c923d8d

Browse files
committed
debug
1 parent 4633e5a commit c923d8d

File tree

6 files changed

+2126
-1699
lines changed

6 files changed

+2126
-1699
lines changed

lib/rp.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { RP, CreateJwtCallback, VerifyJwtCallback, ResponseType, ResponseMode, Scope, PassBy, SupportedVersion, SubjectType } from '@sphereon/did-auth-siop';
1+
import { RP, CreateJwtCallback, VerifyJwtCallback, ResponseType, ResponseMode, Scope, PassBy, SupportedVersion, SubjectType, RequestAud } from '@sphereon/did-auth-siop';
22
import { agent } from './veramo';
33
import { getUniResolver } from '@sphereon/did-uni-client';
44
import { Resolvable, Resolver, ResolverRegistry } from 'did-resolver';
@@ -106,9 +106,7 @@ const verifyDidJWT = async(jwt: string, resolver: Resolvable, options: JWTVerify
106106
}
107107
}
108108

109-
// const resolver = getResolver('ethr');
110-
111-
export const rp = (type:string, id:string) => {
109+
export const rp = (type:string, id:string, aud:any) => {
112110
let constraints = {};
113111
if (type === 'NPI') {
114112
constraints = {
@@ -155,6 +153,7 @@ export const rp = (type:string, id:string) => {
155153
.withVerifyJwtCallback(verifyJwtCallback())
156154
.withRequestBy(PassBy.VALUE)
157155
.withCreateJwtCallback(createJwtCallback())
156+
.withAudience(aud)
158157
// .withSupportedVersions(SupportedVersion.SIOPv2_ID1)
159158
.withSupportedVersions(SupportedVersion.SIOPv2_D12_OID4VP_D20)
160159
.withPresentationDefinition({

0 commit comments

Comments
 (0)