auth

package
v0.0.0-...-1700b71 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JWTTokenGenerator

type JWTTokenGenerator struct {
	Method jwt.SigningMethod
	Secret []byte
	Exp    time.Duration
}

func (*JWTTokenGenerator) GenerateToken

func (j *JWTTokenGenerator) GenerateToken(username, password string, admin bool) (string, error)

func (*JWTTokenGenerator) GetSecret

func (j *JWTTokenGenerator) GetSecret() []byte

type TokenGenerator

type TokenGenerator interface {
	GenerateToken(username, password string, admin bool) (string, error)
	GetSecret() []byte
}

Jump to

Keyboard shortcuts

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