Add doc.go, finish YubiKey removal.
This commit is contained in:
5
doc.go
Normal file
5
doc.go
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
// twofactor implements two-factor authentication.
|
||||||
|
//
|
||||||
|
// Currently supported are RFC 4226 HOTP one-time passwords and
|
||||||
|
// RFC 6238 TOTP SHA-1 one-time passwords.
|
||||||
|
package twofactor
|
||||||
5
otp.go
5
otp.go
@@ -58,9 +58,8 @@ func otpString(otp OTP) string {
|
|||||||
typeName = "OATH-HOTP"
|
typeName = "OATH-HOTP"
|
||||||
case OATH_TOTP:
|
case OATH_TOTP:
|
||||||
typeName = "OATH-TOTP"
|
typeName = "OATH-TOTP"
|
||||||
case YUBIKEY:
|
default:
|
||||||
return fmt.Sprintf("YubiKey with %d byte public identity",
|
typeName = "UNKNOWN"
|
||||||
len(otp.(*YubiKey).Public()))
|
|
||||||
}
|
}
|
||||||
return fmt.Sprintf("%s, %d", typeName, otp.Size())
|
return fmt.Sprintf("%s, %d", typeName, otp.Size())
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user