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: 0

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