MCPcopy Create free account
hub / github.com/devaccuracy/ledgerforge / extractKey

Function extractKey

api/middleware/auth.go:285–287  ·  view source on GitHub ↗

extractKey retrieves the authentication key from the X-LedgerForge-Key header. Parameters: - c: The Gin context containing the request headers. Returns: - string: The authentication key, or empty string if not found.

(c *gin.Context)

Source from the content-addressed store, hash-verified

283// Returns:
284// - string: The authentication key, or empty string if not found.
285func extractKey(c *gin.Context) string {
286 return c.GetHeader(KeyHeader)
287}

Callers 2

AuthenticateMethod · 0.85
TestExtractKeyFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestExtractKeyFunction · 0.68