auth

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ContextKey = "user"
)

Variables

This section is empty.

Functions

func Middleware

func Middleware(settings *config.Settings) fiber.Handler

Middleware is the middleware for Dex JWT authentication.

Types

type CustomDexClaims

type CustomDexClaims struct {
	ProviderID      string `json:"provider_id"`
	AtHash          string `json:"at_hash"`
	EmailVerified   bool   `json:"email_verified"`
	EthereumAddress string `json:"ethereum_address"`
}

CustomDexClaims is the custom claims for the token.

type Token

type Token struct {
	jwt.RegisteredClaims
	CustomDexClaims
}

Token is the token for the user.

func GetDexJWT

func GetDexJWT(c *fiber.Ctx) (*Token, bool)

GetDexJWT returns the dex jwt from the context.

Jump to

Keyboard shortcuts

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