profiles

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: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	COOKIE_ID_TOKEN     = "oidcfy.idToken"
	COOKIE_ACCESS_TOKEN = "oidcfy.accessToken"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthenticationProfile

type AuthenticationProfile struct {
	Config *config.OidcProfileConfig
	UsedBy []Rule

	DiscoveryUrl *template.Template
	ClientId     *template.Template
	ClientSecret *template.Template
	Scopes       *template.Template

	LoginTimeout *template.Template

	CookieDomain *template.Template
	CookiePath   *template.Template
	CookieSecure *template.Template
	// contains filtered or unexported fields
}

func (*AuthenticationProfile) Authenticate

func (*AuthenticationProfile) AuthenticateCallback

func (rule *AuthenticationProfile) AuthenticateCallback(rw http.ResponseWriter, r *http.Request, ctx interfaces.AuthContext) error

func (*AuthenticationProfile) CheckAuthentication

func (rule *AuthenticationProfile) CheckAuthentication(rw http.ResponseWriter, r *http.Request, ctx interfaces.AuthContext) (bool, error)

func (*AuthenticationProfile) FromConfig

func (rule *AuthenticationProfile) FromConfig(profileConfig *config.OidcProfileConfig, name string) []error

func (*AuthenticationProfile) GetConfig

func (rule *AuthenticationProfile) GetConfig() *config.OidcProfileConfig

func (*AuthenticationProfile) IsValid

func (rule *AuthenticationProfile) IsValid() bool

type AuthorizationProfile

type AuthorizationProfile struct {
	Config    *config.AuthorizationProfileConfig
	UsedBy    []Rule
	Condition interfaces.Condition
}

func (*AuthorizationProfile) Evaluate

func (*AuthorizationProfile) FromConfig

func (rule *AuthorizationProfile) FromConfig(profileConfig *config.AuthorizationProfileConfig, name string) []error

func (*AuthorizationProfile) GetConfig

func (*AuthorizationProfile) IsValid

func (rule *AuthorizationProfile) IsValid() bool

type MatchProfile

type MatchProfile struct {
	Config    *config.MatchProfileConfig
	UsedBy    []Rule
	Condition interfaces.Condition
}

func (*MatchProfile) Evaluate

func (rule *MatchProfile) Evaluate(ctx interfaces.ConditionContext) (bool, error)

func (*MatchProfile) FromConfig

func (rule *MatchProfile) FromConfig(profileConfig *config.MatchProfileConfig, name string) []error

func (*MatchProfile) GetConfig

func (rule *MatchProfile) GetConfig() *config.MatchProfileConfig

func (*MatchProfile) IsValid

func (rule *MatchProfile) IsValid() bool

type MutatorProfile

type MutatorProfile struct {
	Config   *config.MutatorProfileConfig
	UsedBy   []Rule
	Mutators []interfaces.Mutator
}

func (*MutatorProfile) FromConfig

func (mut *MutatorProfile) FromConfig(profileConfig *config.MutatorProfileConfig, name string) []error

func (*MutatorProfile) GetConfig

func (mut *MutatorProfile) GetConfig() *config.MutatorProfileConfig

func (*MutatorProfile) IsValid

func (mut *MutatorProfile) IsValid() bool

func (*MutatorProfile) Mutate

type Profiles

type Profiles struct {
	MatchProfiles          map[string]*MatchProfile
	AuthenticationProfiles map[string]*AuthenticationProfile
	AuthorizationProfiles  map[string]*AuthorizationProfile
	MutatorProfiles        map[string]*MutatorProfile
	Rules                  []*Rule
}

func (*Profiles) FromConfig

func (profs *Profiles) FromConfig(rootConfig *config.RootConfig) []error

func (*Profiles) GetAuthenticationProfile

func (profiles *Profiles) GetAuthenticationProfile(ctx interfaces.AuthContext) (*AuthenticationProfile, error)

func (*Profiles) GetAuthorizationProfile

func (profiles *Profiles) GetAuthorizationProfile(ctx interfaces.AuthContext) (*AuthorizationProfile, error)

func (*Profiles) GetMatchProfile

func (profiles *Profiles) GetMatchProfile(name string) (*MatchProfile, error)

func (*Profiles) GetMutatorProfile

func (profiles *Profiles) GetMutatorProfile(ctx interfaces.AuthContext) (*MutatorProfile, error)

func (*Profiles) GetRule

func (profiles *Profiles) GetRule(ctx interfaces.ConditionContext) (*Rule, *MatchProfile, error)

type Rule

type Rule struct {
	Config                    *config.RuleConfig
	MatchProfileName          *template.Template
	AuthenticationProfileName *template.Template
	AuthorizationProfileName  *template.Template
	MutatorProfileName        *template.Template
}

func (*Rule) FromConfig

func (rule *Rule) FromConfig(ruleConfig *config.RuleConfig, index int) []error

func (*Rule) GetAuthenticationProfileName

func (rule *Rule) GetAuthenticationProfileName() *template.Template

func (*Rule) GetAuthorizationProfileName

func (rule *Rule) GetAuthorizationProfileName() *template.Template

func (*Rule) GetConfig

func (rule *Rule) GetConfig() *config.RuleConfig

func (*Rule) GetMatchProfileName

func (rule *Rule) GetMatchProfileName() *template.Template

func (*Rule) GetMutatorProfileName

func (rule *Rule) GetMutatorProfileName() *template.Template

func (*Rule) IsValid

func (rule *Rule) IsValid() bool

Jump to

Keyboard shortcuts

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