Added the ability to remove an MFA method

Includes testing to cover
This commit is contained in:
Dan Brown
2021-07-14 21:27:21 +01:00
parent 7c86c26cd0
commit f696aa5eea
8 changed files with 75 additions and 0 deletions

View File

@ -21,6 +21,14 @@ class MfaValue extends Model
const METHOD_TOTP = 'totp';
const METHOD_BACKUP_CODES = 'backup_codes';
/**
* Get all the MFA methods available.
*/
public static function allMethods(): array
{
return [self::METHOD_TOTP, self::METHOD_BACKUP_CODES];
}
/**
* Upsert a new MFA value for the given user and method
* using the provided value.