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