(value: string | undefined)
| 65 | } |
| 66 | |
| 67 | function bearerToken(value: string | undefined): string | null { |
| 68 | if (value === undefined) return null; |
| 69 | const match = /^Bearer\s+(.+)$/i.exec(value); |
| 70 | return match?.[1]?.trim() ?? null; |
| 71 | } |
| 72 | |
| 73 | function tokenMatches(actual: string, expected: string): boolean { |
| 74 | const actualBytes = Buffer.from(actual); |