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"
|
||||
case OATH_TOTP:
|
||||
typeName = "OATH-TOTP"
|
||||
case YUBIKEY:
|
||||
return fmt.Sprintf("YubiKey with %d byte public identity",
|
||||
len(otp.(*YubiKey).Public()))
|
||||
default:
|
||||
typeName = "UNKNOWN"
|
||||
}
|
||||
return fmt.Sprintf("%s, %d", typeName, otp.Size())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user