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

Function normalizeCredential

src/auth/runtime/AuthRuntime.ts:41–47  ·  view source on GitHub ↗
(value: null | string | undefined)

Source from the content-addressed store, hash-verified

39} from './types.js'
40
41function normalizeCredential(value: null | string | undefined): null | string {
42 if (typeof value !== 'string') {
43 return null
44 }
45 const trimmed = value.trim()
46 return trimmed.length > 0 ? trimmed : null
47}
48
49function hasManagedInferenceScope(scopes: string[] | undefined): boolean {
50 return Boolean(scopes?.includes('user:inference'))

Callers 4

getEffectiveApiKeyResultFunction · 0.85
resolveSessionSnapshotFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected