From ffa9ad4b04abdb43ae4cc6e63670a38c78789472 Mon Sep 17 00:00:00 2001 From: Matthieu Bosquet Date: Fri, 15 Jan 2021 11:05:06 +0000 Subject: [PATCH] fix: Disable strong client_id check --- package.json | 2 +- src/guards/AccessTokenGuard.ts | 10 +--------- src/types/AccessToken.ts | 2 +- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index b3749fd..5cd2d62 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@solid/identity-token-verifier", - "version": "0.4.3", + "version": "0.5.0", "description": "Verifies Solid access tokens via their WebID claim, and thus asserts ownership of WebIDs.", "license": "MIT", "keywords": [ diff --git a/src/guards/AccessTokenGuard.ts b/src/guards/AccessTokenGuard.ts index fa949f4..edf0d2d 100644 --- a/src/guards/AccessTokenGuard.ts +++ b/src/guards/AccessTokenGuard.ts @@ -30,16 +30,8 @@ export function isAccessTokenHeader( export function isAccessTokenPayload( x: unknown ): asserts x is AccessTokenPayload { - asserts.areObjectPropertiesOf(x, [ - "aud", - "client_id", - "exp", - "iat", - "iss", - "webid", - ]); + asserts.areObjectPropertiesOf(x, ["aud", "exp", "iat", "iss", "webid"]); asserts.isLiteral(x.aud, "solid" as const); - asserts.isString(x.client_id); asserts.isNumber(x.exp); asserts.isNumber(x.iat); asserts.isString(x.iss); diff --git a/src/types/AccessToken.ts b/src/types/AccessToken.ts index 0a0b633..3ac55fb 100644 --- a/src/types/AccessToken.ts +++ b/src/types/AccessToken.ts @@ -12,7 +12,7 @@ export interface AccessTokenHeader { export interface AccessTokenPayload { aud: "solid"; - client_id: string; + client_id?: string; cnf?: { jkt: string }; exp: number; iat: number;