Documentation
¶
Index ¶
Constants ¶
View Source
const ExportQRCodeSize = 256
ExportQRCodeSize the size of QR code to export
View Source
const PrintQRCodeAllSize = 49
PrintQRCodeAllSize the size of QR code to print
View Source
const PrintQRCodeSize = 35
PrintQRCodeAllSize the size of QR code to print
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GoogleAuthenticator ¶
type GoogleAuthenticator struct{}
GoogleAuthenticator Google Authenticator
func NewGoogleAuthenticator ¶
func NewGoogleAuthenticator() *GoogleAuthenticator
NewGoogleAuthenticator new Google Authenticator
func (*GoogleAuthenticator) GenerateSecret ¶
func (ga *GoogleAuthenticator) GenerateSecret() (string, error)
GenerateSecret generate new secret
func (*GoogleAuthenticator) GetCode ¶
func (ga *GoogleAuthenticator) GetCode(secret string) (code string, err error)
GetCode get code by secret
func (*GoogleAuthenticator) GetQRCode ¶
func (ga *GoogleAuthenticator) GetQRCode(user, secret string) string
GetQRCode get QR code content
Click to show internal directories.
Click to hide internal directories.