MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / Verify

Function Verify

internal/headers/signer.go:99–101  ·  view source on GitHub ↗

Verify checks a header set against any of the provided secrets and the default replay window. Returns true if any secret produces a matching signature. Used by recipients holding multiple active keys during a rotation.

(secrets []string, h AuthHeaders)

Source from the content-addressed store, hash-verified

97// matching signature. Used by recipients holding multiple active keys
98// during a rotation.
99func Verify(secrets []string, h AuthHeaders) bool {
100 return VerifyWithMaxAge(secrets, h, DefaultMaxAge)
101}
102
103// VerifyWithMaxAge is the configurable-window variant of Verify.
104func VerifyWithMaxAge(secrets []string, h AuthHeaders, maxAge time.Duration) bool {

Callers 5

TestInboundDeliveredFunction · 0.92
TestReplayProtectionFunction · 0.92
VerifyMethod · 0.70

Calls 1

VerifyWithMaxAgeFunction · 0.85

Tested by 4

TestInboundDeliveredFunction · 0.74
TestReplayProtectionFunction · 0.74