interfaces

package
v0.0.0-...-e9fb662 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuthActionRedirect     = "redirect"
	AuthActionUnauthorized = "unauthorized"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthContext

type AuthContext interface {
	GetContext() context.Context
	GetRootConfig() *config.RootConfig
	GetOriginalRequest() *AuthOriginalRequest
	GetGlobalCache() *AuthContextGlobalCache
	GetExtra() *AuthContextExtra
	GetAuthContextRule() AuthContextRule
	GetAuthContextMatch() AuthContextMatch
	GetAuthContextAuthentication() AuthContextAuthentication
	GetAuthContextAuthorization() AuthContextAuthorization
	GetAuthContextMutator() AuthContextMutator
}

type AuthContextAuthentication

type AuthContextAuthentication interface {
	GetConfig() *config.OidcProfileConfig
	CheckAuthentication(rw http.ResponseWriter, r *http.Request, ctx AuthContext) (bool, error)
	Authenticate(rw http.ResponseWriter, r *http.Request, ctx AuthContext) error
}

type AuthContextAuthorization

type AuthContextAuthorization interface {
	GetConfig() *config.AuthorizationProfileConfig
}

type AuthContextExtra

type AuthContextExtra struct {
	Oidcfy struct {
		AuthAction      string
		IdTokenRaw      string
		IdToken         map[string]interface{}
		AccessTokenRaw  string
		AccessToken     map[string]interface{}
		RefreshTokenRaw string
	}
}

type AuthContextGlobalCache

type AuthContextGlobalCache struct {
	AuthCallback *cache2go.CacheTable
}

type AuthContextMatch

type AuthContextMatch interface {
	GetConfig() *config.MatchProfileConfig
}

type AuthContextMutator

type AuthContextMutator interface {
	GetConfig() *config.MutatorProfileConfig
}

type AuthContextRule

type AuthContextRule interface {
	GetConfig() *config.RuleConfig
	GetMatchProfileName() *template.Template
	GetAuthenticationProfileName() *template.Template
	GetAuthorizationProfileName() *template.Template
	GetMutatorProfileName() *template.Template
}

type AuthOriginalRequest

type AuthOriginalRequest struct {
	Url    url.URL
	Method string
}

type Condition

type Condition interface {
	Evaluate(ctx ConditionContext) (bool, error)
}

type ConditionContext

type ConditionContext interface {
	GetAuthContext() AuthContext
	GetDebug() ConditionContextDebug
}

type ConditionContextDebug

type ConditionContextDebug interface {
}

type Mutator

type Mutator interface {
	Mutate(rw http.ResponseWriter, ctx MutatorContext) error
}

type MutatorContext

type MutatorContext interface {
	GetAuthContext() AuthContext
	GetDebug() MutatorContextDebug
}

type MutatorContextDebug

type MutatorContextDebug interface {
}

Jump to

Keyboard shortcuts

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