add RegexSelector
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
@@ -142,6 +142,7 @@ type PolicySelector struct {
|
||||
Static *StaticSelectorConf
|
||||
Migration *MigrationSelectorConf
|
||||
Claims *ClaimsSelectorConf
|
||||
Regex *RegexSelectorConf
|
||||
}
|
||||
|
||||
// StaticSelectorConf is the config for the static-policy-selector
|
||||
@@ -173,6 +174,13 @@ type ClaimsSelectorConf struct {
|
||||
UnauthenticatedPolicy string `mapstructure:"unauthenticated_policy"`
|
||||
}
|
||||
|
||||
// RegexSelectorConf is the config for the regex-selector
|
||||
type RegexSelectorConf struct {
|
||||
DefaultPolicy string `mapstructure:"default_policy"`
|
||||
MatchesPolicies map[string]map[string]string `mapstructure:"matches_policies"`
|
||||
UnauthenticatedPolicy string `mapstructure:"unauthenticated_policy"`
|
||||
}
|
||||
|
||||
// New initializes a new configuration
|
||||
func New() *Config {
|
||||
return &Config{
|
||||
|
||||
Reference in New Issue
Block a user