@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 03:37 UTC

main
ts 20 lines 517 Bytes
Raw
1 import * as Schema from "effect/Schema";
2
3 export const DpopPublicJwk = Schema.Struct({
4 kty: Schema.Literal("EC"),
5 crv: Schema.Literal("P-256"),
6 x: Schema.String.check(Schema.isNonEmpty()),
7 y: Schema.String.check(Schema.isNonEmpty()),
8 });
9 export type DpopPublicJwk = typeof DpopPublicJwk.Type;
10
11 export function normalizeDpopHtu(url: string): string | null {
12 try {
13 const parsed = new URL(url);
14 parsed.hash = "";
15 parsed.search = "";
16 return parsed.toString();
17 } catch {
18 return null;
19 }
20 }