auth

package
v0.0.0-...-e4cdb90 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrExpiredToken = errors.New("expired token")

Functions

func HashPasswd

func HashPasswd(password, salt []byte) []byte

func LoadSecret

func LoadSecret(file string) error

func MakeJWT

func MakeJWT(subject string) (string, error)

func MakeSalt

func MakeSalt(rand io.Reader) ([]byte, error)

func VerifyJWT

func VerifyJWT(token string) (subject string, err error)

func VerifyPasswd

func VerifyPasswd(passwdHash, password, salt []byte) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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