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

Method hasBootstrapToken

internal/server/bootstrap.go:156–160  ·  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

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

Calls

no outgoing calls