middlewares

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2025 License: GPL-3.0 Imports: 14 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Config = config.GetConfig()
View Source
var OidcProvider *oidc.Provider
View Source
var Tracer = otel.Tracer("pkg/middlewares")

Functions

func Auth

func Auth() gin.HandlerFunc

Auth middleware function to handle both OIDC and JWT authentication

func IsStaticToken

func IsStaticToken(c *gin.Context, ctx context.Context, tokenString string) (bool, error)

func JWTAuth

func JWTAuth(c *gin.Context, ctx context.Context, tokenString string) error

handleJWTAuth verifies JWT tokens (e.g., Teleport's tokens)

func OIDCAuth

func OIDCAuth(c *gin.Context, ctx context.Context, tokenString string) error

handleOIDCAuth verifies OIDC tokens using Dex's OIDC provider

func RetrieveToken

func RetrieveToken(c *gin.Context) (token string, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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