MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / pickClientAuth

Function pickClientAuth

packages/core/sdk/src/oauth-helpers.ts:934–942  ·  view source on GitHub ↗
(
  clientSecret: string | null | undefined,
  method: ClientAuthMethod,
)

Source from the content-addressed store, hash-verified

932 };
933
934const pickClientAuth = (
935 clientSecret: string | null | undefined,
936 method: ClientAuthMethod,
937): oauth.ClientAuth => {
938 if (!clientSecret) return oauth.None();
939 if (method === "basic") return oauth.ClientSecretBasic(clientSecret);
940 if (method === "basic_raw") return rawClientSecretBasic(clientSecret);
941 return oauth.ClientSecretPost(clientSecret);
942};
943
944const normalizedTokenScope = (
945 as: oauth.AuthorizationServer,

Callers 6

jsonTokenEndpointRequestFunction · 0.85
refreshAccessTokenFunction · 0.85
redeemIdJagAssertionFunction · 0.85

Calls 1

rawClientSecretBasicFunction · 0.85

Tested by

no test coverage detected