mod_auth_jwt

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModAuthJWT = "mod_auth_jwt"
)

Variables

This section is empty.

Functions

func AuthJWTConfCheck

func AuthJWTConfCheck(conf AuthJWTConfFile) error

func AuthJWTRuleCheck

func AuthJWTRuleCheck(conf AuthJWTRuleFile) error

func ProductRulesCheck

func ProductRulesCheck(conf *ProductRulesFile) error

func RuleListCheck

func RuleListCheck(conf *RuleFileList) error

Types

type AuthJWTConf

type AuthJWTConf struct {
	Version string
	Config  ProductRules
}

func AuthJWTConfLoad

func AuthJWTConfLoad(filename string) (AuthJWTConf, error)

type AuthJWTConfFile

type AuthJWTConfFile struct {
	Version *string
	Config  *ProductRulesFile
}

type AuthJWTRule

type AuthJWTRule struct {
	Cond  condition.Condition
	Keys  []keyProvider
	Realm string
}

type AuthJWTRuleFile

type AuthJWTRuleFile struct {
	Cond    string
	KeyFile string // JSON Web Key file
	Realm   string // security realm
}

type AuthJWTRuleTable

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

func NewAuthJWTRuleTable

func NewAuthJWTRuleTable() *AuthJWTRuleTable

func (*AuthJWTRuleTable) Search

func (t *AuthJWTRuleTable) Search(product string) (*RuleList, bool)

func (*AuthJWTRuleTable) Update

func (t *AuthJWTRuleTable) Update(conf AuthJWTConf)

type ConfModAuthJWT

type ConfModAuthJWT struct {
	Basic struct {
		DataPath string
	}

	Log struct {
		OpenDebug bool
	}
}

func ConfLoad

func ConfLoad(filePath string, confRoot string) (*ConfModAuthJWT, error)

func (*ConfModAuthJWT) Check

func (cfg *ConfModAuthJWT) Check(confRoot string) error

type ModuleAuthJWT

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

func NewModuleAuthJWT

func NewModuleAuthJWT() *ModuleAuthJWT

func (*ModuleAuthJWT) Init

func (*ModuleAuthJWT) Name

func (m *ModuleAuthJWT) Name() string

type ModuleAuthJWTState

type ModuleAuthJWTState struct {
	ReqAuthRuleHit                *metrics.Counter
	ReqAuthNoAuthorization        *metrics.Counter
	ReqAuthAuthorizationFormatErr *metrics.Counter
	ReqAuthSuccess                *metrics.Counter
	ReqAuthFailure                *metrics.Counter
}

type ProductRules

type ProductRules map[string]*RuleList

type ProductRulesFile

type ProductRulesFile map[string]*RuleFileList

type RuleFileList

type RuleFileList []AuthJWTRuleFile

type RuleList

type RuleList []AuthJWTRule

Jump to

Keyboard shortcuts

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