MCPcopy Index your code
hub / github.com/coder/coder / NewCredentialInfo

Function NewCredentialInfo

aibridge/intercept/credential.go:25–31  ·  view source on GitHub ↗

NewCredentialInfo creates a CredentialInfo from a raw credential. The credential is automatically masked before storage so that the original secret is never retained.

(kind CredentialKind, credential string)

Source from the content-addressed store, hash-verified

23// The credential is automatically masked before storage so that the
24// original secret is never retained.
25func NewCredentialInfo(kind CredentialKind, credential string) CredentialInfo {
26 return CredentialInfo{
27 Kind: kind,
28 Hint: utils.MaskSecret(credential),
29 Length: len(credential),
30 }
31}

Calls 1

MaskSecretFunction · 0.92