Isolate more the mfa service (#16925)
* Isolate more the mfa service * Simplifing the mfa service * Removing channels and adding waitgroup * Migrating mfa service to regular errors * Fixing tests * i18n extract * Addressing PR review comments * Removing unneeded struct
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
7585e16d84
Коммит
5f190b5624
@@ -185,14 +185,6 @@ func NewRandomString(length int) string {
|
||||
return encoding.EncodeToString(data)[:length]
|
||||
}
|
||||
|
||||
// NewRandomBase32String returns a base32 encoded string of a random slice
|
||||
// of bytes of the given size. The resulting entropy will be (8 * size) bits.
|
||||
func NewRandomBase32String(size int) string {
|
||||
data := make([]byte, size)
|
||||
rand.Read(data)
|
||||
return base32.StdEncoding.EncodeToString(data)
|
||||
}
|
||||
|
||||
// GetMillis is a convenience method to get milliseconds since epoch.
|
||||
func GetMillis() int64 {
|
||||
return time.Now().UnixNano() / int64(time.Millisecond)
|
||||
|
||||
Ссылка в новой задаче
Block a user