verification

package
v0.0.0-...-8e97220 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authenticator

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

Authenticator will generate and validate token from client

func NewAuthenticator

func NewAuthenticator() *Authenticator

NewAuthenticator function will create an Authenticator

func (*Authenticator) GenerateToken

func (auth *Authenticator) GenerateToken(url string, username string, password string) (string, error)

GenerateToken function will generate standard JWT

func (*Authenticator) SetExpiredTime

func (auth *Authenticator) SetExpiredTime(expiredTime int64) *Authenticator

SetExpiredTime will rewrite expired time into authenticator

func (*Authenticator) VerifyToken

func (auth *Authenticator) VerifyToken(authorization string) error

VerifyToken function will valadiate token

Jump to

Keyboard shortcuts

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