MCPcopy Index your code
hub / github.com/aiprodcoder/MIXAPI / VerifyCodeWithKey

Function VerifyCodeWithKey

common/verification.go:46–55  ·  view source on GitHub ↗
(key string, code string, purpose string)

Source from the content-addressed store, hash-verified

44}
45
46func VerifyCodeWithKey(key string, code string, purpose string) bool {
47 verificationMutex.Lock()
48 defer verificationMutex.Unlock()
49 value, okay := verificationMap[purpose+key]
50 now := time.Now()
51 if !okay || int(now.Sub(value.time).Seconds()) >= VerificationValidMinutes*60 {
52 return false
53 }
54 return code == value.code
55}
56
57func DeleteKey(key string, purpose string) {
58 verificationMutex.Lock()

Callers 3

ResetPasswordFunction · 0.92
RegisterFunction · 0.92
EmailBindFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected