Add description field to OtpType
This commit is contained in:
parent
469451b7b7
commit
cfb50276bc
4 changed files with 43 additions and 14 deletions
|
|
@ -8,9 +8,15 @@
|
|||
|
||||
import OneTimePassword
|
||||
|
||||
public enum OtpType {
|
||||
case totp, hotp, none
|
||||
public enum OtpType: String {
|
||||
case totp = "time-based"
|
||||
case hotp = "HMAC-based"
|
||||
case none
|
||||
|
||||
var description: String {
|
||||
return rawValue
|
||||
}
|
||||
|
||||
init(token: Token?) {
|
||||
switch token?.generator.factor {
|
||||
case .some(.counter):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue