authenticator

package
v0.0.0-...-3ada85e Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

* * @Author: myxy99 <myxy99@foxmail.com> * @Date: 2020/8/6 18:42

* * @Author: myxy99 <myxy99@foxmail.com> * @Date: 2020/8/6 18:39

Index

Constants

This section is empty.

Variables

View Source
var DefaultInvokerCfg = InvokerCfg{
	User: "",
	Iss:  "",
}

Functions

func DefaultBuild

func DefaultBuild() module.Invoker

default invoker build

Types

type Client

type Client struct {
	Auth *GoogleAuth
	// contains filtered or unexported fields
}

func Invoker

func Invoker(name string) *Client

invoker

type GoogleAuth

type GoogleAuth struct {
	// contains filtered or unexported fields
}

func (*GoogleAuth) Authenticate

func (g *GoogleAuth) Authenticate(code string) (ok bool, err error)

生成验证code正确

func (*GoogleAuth) GenerateKey

func (g *GoogleAuth) GenerateKey() string

生成密钥

func (*GoogleAuth) ProvisionURL

func (g *GoogleAuth) ProvisionURL() (codeUrl string)

生成url

func (*GoogleAuth) SetKey

func (g *GoogleAuth) SetKey(key string)

设置密钥

type InvokerCfg

type InvokerCfg struct {
	User string `ini:"user"`
	Iss  string `ini:"iss"`
}

Jump to

Keyboard shortcuts

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