MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / hasBootstrapToken

Method hasBootstrapToken

internal/server/bootstrap.go:157–161  ·  view source on GitHub ↗

hasBootstrapToken reports whether a bootstrap token is currently configured. Lock-aware — safe to call without holding s.bootstrapMu. Used by handleSessionCheck to decide whether to advertise setup_method=logs_token.

()

Source from the content-addressed store, hash-verified

155// Used by handleSessionCheck to decide whether to advertise
156// setup_method=logs_token.
157func (s *Server) hasBootstrapToken() bool {
158 s.bootstrapMu.Lock()
159 defer s.bootstrapMu.Unlock()
160 return !s.bootstrapToken.IsZero()
161}
162
163// checkBootstrapToken validates the X-Bootstrap-Token header on r against
164// the in-memory token using a constant-time comparison. Returns false if

Calls 3

LockMethod · 0.80
UnlockMethod · 0.80
IsZeroMethod · 0.45