MCPcopy Create free account
hub / github.com/Noumena-Network/code / shouldWarnSetupTokenForPrincipalSource

Function shouldWarnSetupTokenForPrincipalSource

src/cli/handlers/util.tsx:21–32  ·  view source on GitHub ↗
(
  principalSource: PrincipalSource,
)

Source from the content-addressed store, hash-verified

19import type { PrincipalSource } from '../../auth/runtime/types.js';
20
21export function shouldWarnSetupTokenForPrincipalSource(
22 principalSource: PrincipalSource,
23): boolean {
24 return (
25 principalSource === 'direct_api_key_env' ||
26 principalSource === 'api_key_helper' ||
27 principalSource === 'service_oauth_env' ||
28 principalSource === 'service_oauth_fd' ||
29 principalSource === 'service_api_key_fd' ||
30 principalSource === 'external_bearer_compat'
31 );
32}
33
34export function shouldShowSetupTokenAuthWarning(): boolean {
35 return shouldWarnSetupTokenForPrincipalSource(

Callers 2

util.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected