auth

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewKey

func NewKey() []byte

Types

type Auth

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

func NewAuth

func NewAuth(q *query.Query) *Auth

func (*Auth) GetToken

func (a *Auth) GetToken(username string, password string) string

func (*Auth) VerifyToken

func (a *Auth) VerifyToken(token string) bool

type TokenClaim

type TokenClaim struct {
	Username string `json:"usr"`
	Password string `json:"pwd"`

	jwt.RegisteredClaims
}

Jump to

Keyboard shortcuts

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