MCPcopy Create free account
hub / github.com/gogs/gogs / TwoFactorCacheKey

Function TwoFactorCacheKey

internal/userutil/userutil.go:140–142  ·  view source on GitHub ↗

TwoFactorCacheKey returns the key used for caching two factor passcode.

(userID int64, passcode string)

Source from the content-addressed store, hash-verified

138
139// TwoFactorCacheKey returns the key used for caching two factor passcode.
140func TwoFactorCacheKey(userID int64, passcode string) string {
141 return fmt.Sprintf("twoFactor::%d::%s", userID, passcode)
142}
143
144// RandomSalt returns randomly generated 10-character string that can be used as
145// the user salt.

Callers 2

LoginTwoFactorPostFunction · 0.92
TestTwoFactorCacheKeyFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestTwoFactorCacheKeyFunction · 0.68