jwt

package
v0.2.11 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2025 License: MIT Imports: 12 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 {
	UserID   string            `json:"user_id"`
	Username string            `json:"username"`
	Email    string            `json:"email"`
	Roles    []string          `json:"roles"`
	Custom   map[string]string `json:"custom,omitempty"`
	jwt.RegisteredClaims
}

type JWTPlugin

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

func (*JWTPlugin) GetClaimsFromContext

func (j *JWTPlugin) GetClaimsFromContext(ctx context.Context) (*Claims, bool)

GetClaimsFromContext extracts JWT claims from request context

func (*JWTPlugin) Health

func (j *JWTPlugin) Health() error

Health checks if the JWT plugin is healthy

func (*JWTPlugin) Initialize

func (j *JWTPlugin) Initialize(config map[string]interface{}) error

func (*JWTPlugin) Middleware

func (j *JWTPlugin) Middleware(next http.Handler) http.Handler

func (*JWTPlugin) Name

func (j *JWTPlugin) Name() string

func (*JWTPlugin) OnShutdown

func (j *JWTPlugin) OnShutdown() error

OnShutdown lifecycle hook

func (*JWTPlugin) OnStart

func (j *JWTPlugin) OnStart() error

OnStart lifecycle hook

func (*JWTPlugin) Status

func (j *JWTPlugin) Status() string

Status returns human-readable status

func (*JWTPlugin) Tags

func (j *JWTPlugin) Tags() map[string]string

Tags returns plugin tags for discovery

func (*JWTPlugin) Type

func (j *JWTPlugin) Type() string

Jump to

Keyboard shortcuts

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