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

Function pickClientAuth

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

Source from the content-addressed store, hash-verified

965 };
966
967const pickClientAuth = (
968 clientSecret: string | null | undefined,
969 method: ClientAuthMethod,
970): oauth.ClientAuth => {
971 if (!clientSecret) return oauth.None();
972 if (method === "basic") return oauth.ClientSecretBasic(clientSecret);
973 if (method === "basic_raw") return rawClientSecretBasic(clientSecret);
974 return oauth.ClientSecretPost(clientSecret);
975};
976
977const normalizedTokenScope = (
978 as: oauth.AuthorizationServer,

Callers 6

jsonTokenEndpointRequestFunction · 0.85
attemptFunction · 0.85
redeemIdJagAssertionFunction · 0.85

Calls 1

rawClientSecretBasicFunction · 0.85

Tested by

no test coverage detected