auth

package
v0.51.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2024 License: GPL-3.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Secret    []byte
	TokenAuth *jwtauth.JWTAuth
)

Functions

func CreateExpiringPublicToken added in v0.49.0

func CreateExpiringPublicToken(exp time.Time, claims map[string]any) (string, error)

func CreatePublicToken added in v0.49.0

func CreatePublicToken(claims map[string]any) (string, error)

func CreateToken

func CreateToken(u *model.User) (string, error)

func Init added in v0.43.0

func Init(ds model.DataStore)

func TouchToken

func TouchToken(token jwt.Token) (string, error)

func Validate

func Validate(tokenStr string) (map[string]interface{}, error)

func WithAdminUser added in v0.49.0

func WithAdminUser(ctx context.Context, ds model.DataStore) context.Context

Types

This section is empty.

Jump to

Keyboard shortcuts

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