Documentation ¶
Overview ¶
Package otp allows authentication through a one time password instead of a traditional password.
Index ¶
- Constants
- type OTP
- func (o *OTP) AddGet(w http.ResponseWriter, r *http.Request) error
- func (o *OTP) AddPost(w http.ResponseWriter, r *http.Request) error
- func (o *OTP) ClearGet(w http.ResponseWriter, r *http.Request) error
- func (o *OTP) ClearPost(w http.ResponseWriter, r *http.Request) error
- func (o *OTP) Init(ab *authboss.Authboss) (err error)
- func (o *OTP) LoginGet(w http.ResponseWriter, r *http.Request) error
- func (o *OTP) LoginPost(w http.ResponseWriter, r *http.Request) error
- type User
Constants ¶
View Source
const ( // PageLogin is for identifying the login page for parsing & validation PageLogin = "otplogin" // PageAdd is for adding an otp to the user PageAdd = "otpadd" // PageClear is for deleting all the otps from the user PageClear = "otpclear" // DataNumberOTPs shows the number of otps for add/clear operations DataNumberOTPs = "otp_count" // DataOTP shows the new otp that was added DataOTP = "otp" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OTP ¶
OTP module
func (*OTP) ClearGet ¶
ClearGet shows how many passwords exist and allows the user to clear them all
type User ¶
type User interface { authboss.User // GetOTPs retrieves a string of comma separated bcrypt'd one time passwords GetOTPs() string // PutOTPs puts a string of comma separated bcrypt'd one time passwords PutOTPs(string) }
User for one time passwords
func MustBeOTPable ¶
MustBeOTPable ensures the user can use one time passwords
Directories ¶
Path | Synopsis |
---|---|
Package twofactor allows authentication via one time passwords
|
Package twofactor allows authentication via one time passwords |
sms2fa
Package sms2fa implements two factor auth using sms-transmitted one time passwords.
|
Package sms2fa implements two factor auth using sms-transmitted one time passwords. |
totp2fa
Package totp2fa implements two factor auth using time-based one time passwords.
|
Package totp2fa implements two factor auth using time-based one time passwords. |
Click to show internal directories.
Click to hide internal directories.