@@ -55,7 +55,7 @@ export class OidcVerifier implements Verifier {
5555 }
5656 }
5757
58- protected async verifySolidToken ( token : string ) : Promise < { [ WEBID ] : string , [ CLIENTID ] ?: string } > {
58+ protected async verifySolidToken ( token : string ) : Promise < ClaimSet > {
5959 const claims = await this . verifyToken ( `Bearer ${ token } ` ) ;
6060 const issuers = this . verifyOptions . issuer ;
6161 const allowedIssuers = issuers !== undefined && ( typeof issuers === 'string' ? [ issuers ] : issuers as string [ ] ) ;
@@ -70,13 +70,12 @@ export class OidcVerifier implements Verifier {
7070 return ( {
7171 // TODO: would have to use different value than "WEBID"
7272 // TODO: still want to use WEBID as external value potentially?
73- [ WEBID ] : claims . webid ,
74- ...clientId && { [ CLIENTID ] : clientId }
73+ [ WEBID ] : [ claims . webid ] ,
74+ ...clientId && { [ CLIENTID ] : [ clientId ] }
7575 } ) ;
7676 }
7777
78- protected async verifyStandardToken ( token : string , format : string , issuer : string ) :
79- Promise < { [ WEBID ] ?: string , [ CLIENTID ] ?: string , [ ACCESS ] ?: Permission [ ] } > {
78+ protected async verifyStandardToken ( token : string , format : string , issuer : string ) : Promise < ClaimSet > {
8079 const jwkSet = await getJwks ( issuer ) ;
8180 const decoded = await jwtVerify ( token , jwkSet , this . verifyOptions ) ;
8281
@@ -86,8 +85,8 @@ export class OidcVerifier implements Verifier {
8685 }
8786 const client = decoded . payload . azp as string | undefined ;
8887 return {
89- [ WEBID ] : decoded . payload . sub ,
90- ...client && { [ CLIENTID ] : client }
88+ [ WEBID ] : [ decoded . payload . sub ] ,
89+ ...client && { [ CLIENTID ] : [ client ] }
9190 } ;
9291 } else if ( format === ACCESS_TOKEN ) {
9392 const iss = decoded . payload . iss ;
0 commit comments