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

Function pickClientAuth

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

Source from the content-addressed store, hash-verified

916// ones, so an absent secret here unambiguously means "public client". The
917// `method` only chooses HOW a present secret is sent (post vs basic).
918const pickClientAuth = (
919 clientSecret: string | null | undefined,
920 method: ClientAuthMethod,
921): oauth.ClientAuth => {
922 if (!clientSecret) return oauth.None();
923 return method === "basic"
924 ? oauth.ClientSecretBasic(clientSecret)
925 : oauth.ClientSecretPost(clientSecret);
926};
927
928const normalizedTokenScope = (
929 as: oauth.AuthorizationServer,

Callers 5

refreshAccessTokenFunction · 0.85
redeemIdJagAssertionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected