HasExpired checks if the mfa is expired, aka. whether it has been more than maxElapsed time since its creation.
(maxElapsed time.Duration)
| 116 | // HasExpired checks if the mfa is expired, aka. whether it has been |
| 117 | // more than maxElapsed time since its creation. |
| 118 | func (m *MFA) HasExpired(maxElapsed time.Duration) bool { |
| 119 | return time.Since(m.Created().Time()) > maxElapsed |
| 120 | } |
| 121 | |
| 122 | func (app *BaseApp) registerMFAHooks() { |
| 123 | recordRefHooks[*MFA](app, CollectionNameMFAs, CollectionTypeAuth) |