jwt_auth

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Handle JWT authentication using the gin-jwt middleware

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleNoRoute

func HandleNoRoute(c *gin.Context)

Handle requests with no route

func MiddlewareHandler

func MiddlewareHandler(authMiddleware *jwt.GinJWTMiddleware) gin.HandlerFunc

Middleware handler for JWT authentication

func Params

func Params[T user]() *jwt.GinJWTMiddleware

Generate default JWT parameters for the middleware

func RegisterRoute

func RegisterRoute(g *gin.RouterGroup, handle *jwt.GinJWTMiddleware)

Register JWT routes with the given middleware

Types

type JwtRequest

type JwtRequest struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

JwtRequest represents the incoming request for a JWT

Jump to

Keyboard shortcuts

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