Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultCacheDuration = "200 202 401 5m"
DefaultCacheDuration is the fallback value if no cache duration is provided
Variables ¶
This section is empty.
Functions ¶
func NewParser ¶
func NewParser(r resolver.Resolver) parser.IngressAnnotation
NewParser creates a new authentication request annotation parser
func ParseStringToCacheDurations ¶
ParseStringToCacheDurations parses and validates the provided string into a list of cache durations. It will always return at least one duration (the default duration)
func ValidCacheDuration ¶
ValidCacheDuration checks if the provided string is a valid cache duration spec: [code ...] [time ...]; with: code is an http status code
time must match the time regex and may appear multiple times, e.g. `1h 30m`
func ValidHeader ¶
ValidHeader checks is the provided string satisfies the header's name regex
func ValidMethod ¶
ValidMethod checks is the provided string a valid HTTP method
Types ¶
type Config ¶
type Config struct { URL string `json:"url"` // Host contains the hostname defined in the URL Host string `json:"host"` SigninURL string `json:"signinUrl"` Method string `json:"method"` ResponseHeaders []string `json:"responseHeaders,omitempty"` RequestRedirect string `json:"requestRedirect"` AuthSnippet string `json:"authSnippet"` AuthCacheKey string `json:"authCacheKey"` AuthCacheDuration []string `json:"authCacheDuration"` ProxySetHeaders map[string]string `json:"proxySetHeaders,omitempty"` }
Config returns external authentication configuration for an Ingress rule
Click to show internal directories.
Click to hide internal directories.