diff --git a/packages/taco/src/conditions/schemas/jwt.ts b/packages/taco/src/conditions/schemas/jwt.ts index 9f543735..000e0834 100644 --- a/packages/taco/src/conditions/schemas/jwt.ts +++ b/packages/taco/src/conditions/schemas/jwt.ts @@ -11,9 +11,10 @@ export const jwtConditionSchema = baseConditionSchema.extend({ conditionType: z.literal(JWTConditionType).default(JWTConditionType), publicKey: z.string().optional(), expectedIssuer: z.string().optional(), - subject: contextParamSchema.optional(), - expirationWindow: z.number().int().nonnegative().optional(), - issuedWindow: z.number().int().nonnegative().optional(), + // TODO see https://github.com/nucypher/taco-web/pull/604#discussion_r1901746814 + // subject: contextParamSchema.optional(), + // expirationWindow: z.number().int().nonnegative().optional(), + // issuedWindow: z.number().int().nonnegative().optional(), jwtToken: contextParamSchema.default(JWT_PARAM_DEFAULT), }); diff --git a/packages/taco/test/conditions/base/jwt.test.ts b/packages/taco/test/conditions/base/jwt.test.ts index d5b2de62..8598e95e 100644 --- a/packages/taco/test/conditions/base/jwt.test.ts +++ b/packages/taco/test/conditions/base/jwt.test.ts @@ -23,7 +23,7 @@ describe('JWTCondition', () => { it('rejects an invalid schema', () => { const badJWTObj = { ...testJWTConditionObj, - subject: TEST_CONTRACT_ADDR, + jwtToken: TEST_CONTRACT_ADDR, }; const result = JWTCondition.validate(jwtConditionSchema, badJWTObj); @@ -31,7 +31,7 @@ describe('JWTCondition', () => { expect(result.error).toBeDefined(); expect(result.data).toBeUndefined(); expect(result.error?.format()).toMatchObject({ - subject: { + jwtToken: { _errors: ['Invalid'], }, }); diff --git a/packages/taco/test/test-utils.ts b/packages/taco/test/test-utils.ts index 41fb2a35..1857142b 100644 --- a/packages/taco/test/test-utils.ts +++ b/packages/taco/test/test-utils.ts @@ -269,9 +269,9 @@ export const testJWTConditionObj: JWTConditionProps = { conditionType: JWTConditionType, publicKey: TEST_ECDSA_PUBLIC_KEY, expectedIssuer: '0xacbd', - subject: ':userAddress', - expirationWindow: 1800, - issuedWindow: 86400, + // subject: ':userAddress', + // expirationWindow: 1800, + // issuedWindow: 86400, jwtToken: JWT_PARAM_DEFAULT, };