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

Function RegisterVerificationCodeWithKey

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

Source from the content-addressed store, hash-verified

32}
33
34func RegisterVerificationCodeWithKey(key string, code string, purpose string) {
35 verificationMutex.Lock()
36 defer verificationMutex.Unlock()
37 verificationMap[purpose+key] = verificationValue{
38 code: code,
39 time: time.Now(),
40 }
41 if len(verificationMap) > verificationMapMaxSize {
42 removeExpiredPairs()
43 }
44}
45
46func VerifyCodeWithKey(key string, code string, purpose string) bool {
47 verificationMutex.Lock()

Callers 2

SendEmailVerificationFunction · 0.92
SendPasswordResetEmailFunction · 0.92

Calls 1

removeExpiredPairsFunction · 0.85

Tested by

no test coverage detected