Documentation ¶
Index ¶
- type GoogleAuth
- func (ga *GoogleAuth) GetCode(timestamp int64, secret string) (string, error)
- func (ga *GoogleAuth) GetQrcode(user, secret string) string
- func (ga *GoogleAuth) GetQrcodeURL(user, secret string) string
- func (ga *GoogleAuth) GetSecret() string
- func (ga *GoogleAuth) SetWindow(window int64)
- func (ga *GoogleAuth) VerifyCode(secret, code string) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GoogleAuth ¶
type GoogleAuth struct {
// contains filtered or unexported fields
}
GoogleAuth 谷歌动态验证码
func (*GoogleAuth) GetCode ¶
func (ga *GoogleAuth) GetCode(timestamp int64, secret string) (string, error)
GetCode 获取动态码
func (*GoogleAuth) GetQrcode ¶
func (ga *GoogleAuth) GetQrcode(user, secret string) string
GetQrcode 获取动态码二维码内容
func (*GoogleAuth) GetQrcodeURL ¶
func (ga *GoogleAuth) GetQrcodeURL(user, secret string) string
GetQrcodeURL 获取动态码二维码图片地址,这里是第三方二维码api
func (*GoogleAuth) VerifyCode ¶
func (ga *GoogleAuth) VerifyCode(secret, code string) (bool, error)
VerifyCode 验证动态码
Click to show internal directories.
Click to hide internal directories.