auth

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAuthenticationMiddleware

func NewAuthenticationMiddleware(cfg Config, logger klog.Logger) middleware.Func

AuthenticateTenant validates the Bearer Token and attaches the TenantID to the request

Types

type Config

type Config struct {
	JwtSecret     string
	ExtraHeaders  string
	TenantName    string
	TenantIDClaim string

	JwksURL             string
	JwksRefreshEnabled  bool
	JwksRefreshInterval int
	JwksRefreshTimeout  int
}

Config for a gateway

func (*Config) RegisterFlags

func (cfg *Config) RegisterFlags(f *flag.FlagSet)

RegisterFlags adds the flags required to config this package's Config struct

func (*Config) Validate

func (cfg *Config) Validate() error

Validate given config parameters. Returns nil if everything is fine

Jump to

Keyboard shortcuts

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