auth

package
v0.0.0-...-2083224 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 8, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

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 NewGoogleAuth

func NewGoogleAuth(window int64) *GoogleAuth

NewGoogleAuth NewGoogleAuth

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) GetSecret

func (ga *GoogleAuth) GetSecret() string

GetSecret 获取秘钥

func (*GoogleAuth) SetWindow

func (ga *GoogleAuth) SetWindow(window int64)

SetWindow 设置时间窗

func (*GoogleAuth) VerifyCode

func (ga *GoogleAuth) VerifyCode(secret, code string) (bool, error)

VerifyCode 验证动态码

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL