fix: remove old zitadel client

This commit is contained in:
Yordis Prieto
2024-07-25 23:16:07 -04:00
parent c2866b5d9d
commit 18851a0bbc
77 changed files with 6081 additions and 5616 deletions

View File

@@ -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);
};
}