routers

package
v0.0.0-...-3a8821d Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

View Source
const AuthUserName string = "_nexodus.UserName"

key for username in gin.Context

Variables

This section is empty.

Functions

func NewAPIRouter

func NewAPIRouter(ctx context.Context, o APIRouterOptions) (*gin.Engine, error)

func NoCacheMiddleware

func NoCacheMiddleware(c *gin.Context)

func ValidateJWT

func ValidateJWT(ctx context.Context, o APIRouterOptions, jwksURI string, nexodusJWKS string) (func(*gin.Context), error)

Naive JWS Key validation

Types

type APIRouterOptions

type APIRouterOptions struct {
	Logger          *zap.SugaredLogger
	Api             *handlers.API
	ClientIdWeb     string
	ClientIdCli     string
	OidcURL         string
	OidcBackchannel string
	InsecureTLS     bool
	BrowserFlow     *agent.OidcAgent
	DeviceFlow      *agent.OidcAgent
	Store           storage.Store
	SessionStore    session.ManagerStore
}

type Limiter

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

func NewLimiter

func NewLimiter(maxConcurrency int) Limiter

func (*Limiter) Do

func (c *Limiter) Do(ctx context.Context, f func()) (canceled bool)

type UserLimiters

type UserLimiters struct {
	Single Limiter
	// contains filtered or unexported fields
}

func NewUserLimiters

func NewUserLimiters() *UserLimiters

func (*UserLimiters) Add

func (c *UserLimiters) Add()

func (*UserLimiters) Done

func (c *UserLimiters) Done() int32

Jump to

Keyboard shortcuts

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