feat: import upstream ZITADEL Login V2 v4.20.4 source workspace

This commit is contained in:
Vib Tools committed 2026-11-22 04:15:54 -08:00
1 parent eadd0e558b
commit 4404849fc4
644 files changed
+153201 -10

No files matched your search

@@ -0,0 +1,16 @@
import type { Interceptor } from "@connectrpc/connect";
/**
* Creates an interceptor that adds an Authorization header with a Bearer token.
* @param token
*/
export function NewAuthorizationBearerInterceptor(token: string): Interceptor {
return (next) => (req) => {
// TODO: I am not what is the intent of checking for the Authorization header
// and setting it if it is not present.
if (!req.header.get("Authorization")) {
req.header.set("Authorization", `Bearer ${token}`);
}
return next(req);
};
}