Documentation ¶
Overview ¶
Package backendauth (TODO) defines the backend configuration options and element slices.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewConfigStructure ¶
NewConfigStructure global configuration structure for this package. Used in frontend (to display the user all the settings) and in backend (scope checks and default values). See the source code of this function for the overall available sections, groups and fields.
Types ¶
type ConfigIPRange ¶
ConfigIPRange defines how IP ranges are stored and handled. A valid IP range string looks like for example:
IPv4: 74.50.153.0-74.50.153.4 IPv6: ::ffff:192.0.2.128-::ffff:192.0.2.250 IPv6: 2001:0db8:85a3:0000:0000:8a2e:0370:7334-2001:0db8:85a3:0000:0000:8a2e:0370:8334
No white spaces! Multiple entries supported via \r and/or \n.
func NewConfigIPRange ¶
func NewConfigIPRange(path string, opts ...cfgmodel.Option) ConfigIPRange
NewConfigIPRange ....
type Configuration ¶
type Configuration struct { *auth.OptionFactories // Disabled indicates whether authentication has been enabled or not. // Path: net/auth/disabled Disabled cfgmodel.Bool // AllowedIP indicates which IPs are allowed. // Separate via line break (\n). // // Path: net/auth/allowed_ips AllowedIPs cfgmodel.StringCSV // DeniedIPs indicates which IPs are denied. // Separate via line break (\n). // // Path: net/auth/denied_ips DeniedIPs cfgmodel.StringCSV // AllowedIPRange indicates which IP ranges are denied. // Separate via line break (\n). // // Path: net/auth/denied_ips AllowedIPRange ConfigIPRange // DeniedIPRange indicates which IP ranges are denied. // Separate via line break (\n). // // Path: net/auth/denied_ips DeniedIPRange ConfigIPRange }
Configuration just exported for the sake of documentation. See fields for more information. The PkgBackend handles the reading and writing of configuration values within this package.
func New ¶
func New(cfgStruct element.Sections, opts ...cfgmodel.Option) *Configuration
New initializes the backend configuration models containing the cfgpath.Route variable to the appropriate entries in the storage. The argument Sections and opts will be applied to all models.
func (*Configuration) PrepareOptionFactory ¶
func (be *Configuration) PrepareOptionFactory() auth.OptionFactoryFunc
PrepareOptionFactory creates a closure around the type Backend. The closure will be used during a scoped request to figure out the configuration depending on the incoming scope. An option array will be returned by the closure.