Documentation ¶
Index ¶
- Constants
- Variables
- func FlagSet() *flag.FlagSet
- func StringToTemplateHookFunc() mapstructure.DecodeHookFuncType
- func StringToURLHookFunc() mapstructure.DecodeHookFuncType
- func Validate(mode int, conf Config) error
- type Config
- type HTTP
- type HTTPCheck
- type Log
- type OAuth2
- type OAuth2Client
- type OAuth2Endpoints
- type OAuth2Validate
- type OpenVpn
- type OpenVpnBypass
Constants ¶
View Source
const ( Plugin = iota ManagementClient )
Variables ¶
View Source
var Defaults = Config{ Log: Log{ Format: "console", Level: "info", }, HTTP: HTTP{ BaseURL: &url.URL{ Scheme: "http", Host: "localhost:9000", }, Listen: ":9000", TLS: false, Check: HTTPCheck{ IPAddr: false, }, }, OpenVpn: OpenVpn{ Addr: &url.URL{ Scheme: "unix", Path: "/run/openvpn/server.sock", OmitHost: true, }, AuthTokenUser: true, AuthPendingTimeout: 3 * time.Minute, Bypass: OpenVpnBypass{ CommonNames: make([]string, 0), }, }, OAuth2: OAuth2{ Provider: "generic", Issuer: &url.URL{Scheme: "", Host: ""}, Endpoints: OAuth2Endpoints{ Auth: &url.URL{Scheme: "", Host: ""}, Discovery: &url.URL{Scheme: "", Host: ""}, Token: &url.URL{Scheme: "", Host: ""}, }, Client: OAuth2Client{}, Validate: OAuth2Validate{ Groups: make([]string, 0), Roles: make([]string, 0), IPAddr: false, Issuer: true, }, Scopes: []string{"openid", "profile"}, }, }
View Source
var ErrRequired = errors.New("required")
Functions ¶
func StringToTemplateHookFunc ¶ added in v1.6.0
func StringToTemplateHookFunc() mapstructure.DecodeHookFuncType
StringToTemplateHookFunc parse a string to template.Template.
func StringToURLHookFunc ¶ added in v1.7.0
func StringToURLHookFunc() mapstructure.DecodeHookFuncType
StringToURLHookFunc parse a string to url.URL.
Types ¶
type Config ¶
type HTTP ¶ added in v1.7.0
type HTTP struct { Listen string `koanf:"listen"` CertFile string `koanf:"cert"` KeyFile string `koanf:"key"` TLS bool `koanf:"tls"` BaseURL *url.URL `koanf:"baseurl"` Secret string `koanf:"secret"` CallbackTemplate *template.Template `koanf:"callback-template-path"` Check HTTPCheck `koanf:"check"` EnableProxyHeaders bool `koanf:"enable-proxy-headers"` }
type OAuth2 ¶ added in v1.0.0
type OAuth2 struct { Issuer *url.URL `koanf:"issuer"` Provider string `koanf:"provider"` AuthorizeParams string `koanf:"authorize-params"` Endpoints OAuth2Endpoints `koanf:"endpoint"` Client OAuth2Client `koanf:"client"` Scopes []string `koanf:"scopes"` Pkce bool `koanf:"pkce"` Validate OAuth2Validate `koanf:"validate"` }
type OAuth2Client ¶ added in v1.0.0
type OAuth2Endpoints ¶ added in v1.2.0
type OAuth2Validate ¶ added in v1.0.0
type OpenVpnBypass ¶ added in v1.1.0
type OpenVpnBypass struct {
CommonNames []string `koanf:"cn"`
}
Click to show internal directories.
Click to hide internal directories.