Skip to content

Commit

Permalink
Apply RFCs from nucypher#604
Browse files Browse the repository at this point in the history
  • Loading branch information
vzotova committed Dec 16, 2024
1 parent 255d3a1 commit c29bbb0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions packages/taco/src/conditions/schemas/jwt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ export const JWTConditionType = 'jwt';

export const jwtConditionSchema = baseConditionSchema.extend({
conditionType: z.literal(JWTConditionType).default(JWTConditionType),
public_key: z.string().optional(),
expected_issuer: z.string().optional(),
publicKey: z.string().optional(),
expectedIssuer: z.string().optional(),
subject: contextParamSchema.optional(),
expiration_window: z.number().int().nonnegative().optional(),
issued_window: z.number().int().nonnegative().optional(),
expirationWindow: z.number().int().nonnegative().optional(),
issuedWindow: z.number().int().nonnegative().optional(),
jwtToken: contextParamSchema.default(JWT_PARAM_DEFAULT),
});

Expand Down
8 changes: 4 additions & 4 deletions packages/taco/test/test-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,11 @@ export const testJsonApiConditionObj = {

export const testJWTConditionObj: JWTConditionProps = {
conditionType: JWTConditionType,
public_key: TEST_ECDSA_PUBLIC_KEY,
expected_issuer: '0xacbd',
publicKey: TEST_ECDSA_PUBLIC_KEY,
expectedIssuer: '0xacbd',
subject: ':userAddress',
expiration_window: 1800,
issued_window: 86400,
expirationWindow: 1800,
issuedWindow: 86400,
jwtToken: JWT_PARAM_DEFAULT,
};

Expand Down

0 comments on commit c29bbb0

Please sign in to comment.