auth

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JWTMiddleware

func JWTMiddleware(config *JWTConfig) gin.HandlerFunc

JWTMiddleware crea middleware de autenticación JWT

Types

type JWTConfig

type JWTConfig struct {
	SecretKey     string
	TokenLookup   string // "header:Authorization" o "query:token"
	TokenHeadName string // "Bearer"
	SkipperFunc   func(*gin.Context) bool
	ClaimsFunc    func(*gin.Context, jwt.MapClaims)
}

JWTConfig configura el middleware JWT

func DefaultJWTConfig

func DefaultJWTConfig(secretKey string) *JWTConfig

DefaultJWTConfig retorna configuración por defecto

Jump to

Keyboard shortcuts

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