|
9 | 9 | vi, |
10 | 10 | } from 'vitest' |
11 | 11 |
|
12 | | -import type { Credentials, JsonWebKeySet, SupabaseEnv } from '../types.js' |
| 12 | +import type { JSONWebKeySet } from 'jose' |
| 13 | + |
| 14 | +import type { Credentials, SupabaseEnv } from '../types.js' |
13 | 15 | import { verifyCredentials } from './verify-credentials.js' |
14 | 16 | import { _resetAllowDeprecationWarned } from './utils/deprecation.js' |
15 | 17 | import { InvalidCredentialsError } from '../errors.js' |
@@ -276,7 +278,7 @@ describe('verifyCredentials', () => { |
276 | 278 | }) |
277 | 279 |
|
278 | 280 | describe('user mode', () => { |
279 | | - let jwks: JsonWebKeySet |
| 281 | + let jwks: JSONWebKeySet |
280 | 282 | let validTokens: string[] |
281 | 283 |
|
282 | 284 | beforeAll(async () => { |
@@ -380,7 +382,7 @@ describe('verifyCredentials', () => { |
380 | 382 | }) |
381 | 383 |
|
382 | 384 | describe('user mode with remote JWKS URL', () => { |
383 | | - let jwks: JsonWebKeySet |
| 385 | + let jwks: JSONWebKeySet |
384 | 386 | let validTokens: string[] |
385 | 387 | let fetchMock: ReturnType<typeof vi.fn> |
386 | 388 |
|
@@ -516,7 +518,7 @@ describe('verifyCredentials', () => { |
516 | 518 | publicJwkB.alg = 'RS256' |
517 | 519 | publicJwkB.use = 'sig' |
518 | 520 | publicJwkB.kid = 'remote-key-b' |
519 | | - const jwksB: JsonWebKeySet = { keys: [publicJwkB] } |
| 521 | + const jwksB: JSONWebKeySet = { keys: [publicJwkB] } |
520 | 522 | const tokenB = await new SignJWT({ |
521 | 523 | sub: 'user-remote-b', |
522 | 524 | role: 'authenticated', |
@@ -628,7 +630,7 @@ describe('verifyCredentials', () => { |
628 | 630 | }) |
629 | 631 |
|
630 | 632 | describe('invalid credential rejection (no silent fallthrough)', () => { |
631 | | - let jwks: JsonWebKeySet |
| 633 | + let jwks: JSONWebKeySet |
632 | 634 |
|
633 | 635 | beforeAll(async () => { |
634 | 636 | const { publicKey } = await generateKeyPair('RS256') |
|
0 commit comments