auth

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Claims

type Claims struct {
	Username string `json:"username"`
	jwt.RegisteredClaims
}

type Middleware

type Middleware struct {
	// contains filtered or unexported fields
}

func NewMiddleware

func NewMiddleware(cfg *config.AuthConfig) *Middleware

func (*Middleware) GenerateJWT

func (m *Middleware) GenerateJWT(username string) (string, error)

func (*Middleware) GetAuthStatus

func (m *Middleware) GetAuthStatus(c *gin.Context)

func (*Middleware) Login

func (m *Middleware) Login(c *gin.Context)

func (*Middleware) RequireAuth

func (m *Middleware) RequireAuth() gin.HandlerFunc

func (*Middleware) ValidateToken

func (m *Middleware) ValidateToken(c *gin.Context)

Jump to

Keyboard shortcuts

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