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

Function pickClientAuth

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

Source from the content-addressed store, hash-verified

739// ones, so an absent secret here unambiguously means "public client". The
740// `method` only chooses HOW a present secret is sent (post vs basic).
741const pickClientAuth = (
742 clientSecret: string | null | undefined,
743 method: ClientAuthMethod,
744): oauth.ClientAuth => {
745 if (!clientSecret) return oauth.None();
746 return method === "basic"
747 ? oauth.ClientSecretBasic(clientSecret)
748 : oauth.ClientSecretPost(clientSecret);
749};
750
751const normalizedTokenScope = (
752 as: oauth.AuthorizationServer,

Callers 5

refreshAccessTokenFunction · 0.85
redeemIdJagAssertionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected