mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-12 05:06:55 +00:00
chore: format code
This commit is contained in:
@@ -1,8 +1,5 @@
|
|||||||
|
import { createGrpcTransport, GrpcTransportOptions } from "@connectrpc/connect-node";
|
||||||
import { NewAuthorizationBearerInterceptor } from "@zitadel/client";
|
import { NewAuthorizationBearerInterceptor } from "@zitadel/client";
|
||||||
import {
|
|
||||||
createGrpcTransport,
|
|
||||||
GrpcTransportOptions,
|
|
||||||
} from "@connectrpc/connect-node";
|
|
||||||
import { importPKCS8, SignJWT } from "jose";
|
import { importPKCS8, SignJWT } from "jose";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -10,16 +7,10 @@ import { importPKCS8, SignJWT } from "jose";
|
|||||||
* @param token
|
* @param token
|
||||||
* @param opts
|
* @param opts
|
||||||
*/
|
*/
|
||||||
export function createServerTransport(
|
export function createServerTransport(token: string, opts: GrpcTransportOptions) {
|
||||||
token: string,
|
|
||||||
opts: GrpcTransportOptions,
|
|
||||||
) {
|
|
||||||
return createGrpcTransport({
|
return createGrpcTransport({
|
||||||
...opts,
|
...opts,
|
||||||
interceptors: [
|
interceptors: [...(opts.interceptors || []), NewAuthorizationBearerInterceptor(token)],
|
||||||
...(opts.interceptors || []),
|
|
||||||
NewAuthorizationBearerInterceptor(token),
|
|
||||||
],
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user