auth

package
v0.0.0-...-e065154 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TokenCookieName = "access-token"
)

Variables

This section is empty.

Functions

func DeleteTokenCookie

func DeleteTokenCookie(c echo.Context)

func GenerateTokenAndSetCookie

func GenerateTokenAndSetCookie(c echo.Context, user *ent.User) error

func GetJWTSecret

func GetJWTSecret() string

func GetUserID

func GetUserID(c echo.Context) (uuid.UUID, error)

Types

type Claims

type Claims struct {
	UserID string `json:"user_id"`
	jwt.RegisteredClaims
}

Jump to

Keyboard shortcuts

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