auth

package
v0.0.0-...-f616069 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const AuthCookieName = "ac"

Variables

This section is empty.

Functions

func BuildToken

func BuildToken(id, name, email, role string, expires time.Time) (string, error)

func InitJWT

func InitJWT(secretKey string)

func UserAuthenticatingHandler

func UserAuthenticatingHandler(next http.Handler) http.Handler

UserAuthenticatingHandler is a handler wrapper that TODO

Types

type CtxKey

type CtxKey string
const UserCtxKey CtxKey = "user"

type UserClaims

type UserClaims struct {
	jwt.RegisteredClaims
	Name  string `json:"name"`
	Email string `json:"email"`
}

Jump to

Keyboard shortcuts

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