plugins

package
v0.0.0-...-8e55a6f Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2023 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	WhiteAuthList = []string{
		"/oauth2",
		"/userinfo",
	}
)

Functions

func Init

func Init(
	t jwt.Tokenizer,
	tmr api.TokenManager,
	tenantConfig *shttp.WebMultiTenancyOption,
	clientName api.ClientName,
	services *conf2.Services,
	security *conf2.Security,

	userTenant *uapi.UserTenantContrib,
	tenantStore saas.TenantStore,
	refreshTokenProvider session.RefreshTokenProvider,
	as authz.Service,
	sr authz.SubjectResolver,
	logger klog.Logger,
) error

func Saas

func Saas(ctx context.Context, tenantStore saas.TenantStore, pathRegex string, w http.ResponseWriter, r pkgHTTP.Request) (context.Context, error)

Types

type KitAuthConf

type KitAuthConf struct {
}

type KitAuthn

type KitAuthn struct {
	plugin.DefaultPlugin
}

func (*KitAuthn) Name

func (p *KitAuthn) Name() string

func (*KitAuthn) ParseConf

func (p *KitAuthn) ParseConf(in []byte) (interface{}, error)

func (*KitAuthn) RequestFilter

func (p *KitAuthn) RequestFilter(_ interface{}, w http.ResponseWriter, r pkgHTTP.Request)

type KitAuthz

type KitAuthz struct {
	plugin.DefaultPlugin
}

KitAuthz authorization plugin

func (*KitAuthz) Name

func (p *KitAuthz) Name() string

func (*KitAuthz) ParseConf

func (p *KitAuthz) ParseConf(in []byte) (interface{}, error)

func (*KitAuthz) RequestFilter

func (p *KitAuthz) RequestFilter(conf interface{}, w http.ResponseWriter, r pkgHTTP.Request)

type KitAuthzConf

type KitAuthzConf struct {
	Requirement []Requirement `json:"requirement"`
}

type Requirement

type Requirement struct {
	Namespace string `json:"namespace"`
	Resource  string `json:"resource"`
	Action    string `json:"action"`
}

type Resolver

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

func NewResolver

func NewResolver(r pkgHTTP.Request, key, pathRegex string) *Resolver

func (*Resolver) Resolve

Jump to

Keyboard shortcuts

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