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

Function grantedScopesFromRow

packages/core/sdk/src/executor.ts:964–970  ·  view source on GitHub ↗
(row: {
  readonly oauth_scope?: unknown;
})

Source from the content-addressed store, hash-verified

962 * token endpoint) into the credential's `grantedScopes`. Undefined when the
963 * row carries none, so scope comparisons downstream fail open. */
964const grantedScopesFromRow = (row: {
965 readonly oauth_scope?: unknown;
966}): readonly string[] | undefined => {
967 if (row.oauth_scope == null) return undefined;
968 const scopes = String(row.oauth_scope).split(/\s+/).filter(Boolean);
969 return scopes.length > 0 ? scopes : undefined;
970};
971
972/** The canonical credential variable for a single-secret connection. OAuth tokens
973 * and the primary apiKey value resolve through it. */

Callers 2

connectionCheckHealthFunction · 0.85
executeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected