Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Branding that's our name Branding = branding{"vouch", "VOUCH", "Vouch", "lasso", "https://github.com/vouch/vouch-proxy"} // GenOAuth exported OAuth config variable // TODO: I think GenOAuth and OAuthConfig can be combined! // perhaps by https://golang.org/doc/effective_go.html#embedding GenOAuth *oauthConfig // OAuthClient is the configured client which will call the provider // this actually carries the oauth2 client ala oauthclient.Client(oauth2.NoContext, providerToken) OAuthClient *oauth2.Config // OAuthopts authentication options OAuthopts oauth2.AuthCodeOption // Providers static strings to test against Providers = &OAuthProviders{ Google: "google", GitHub: "github", IndieAuth: "indieauth", ADFS: "adfs", OIDC: "oidc", HomeAssistant: "homeassistant", OpenStax: "openstax", Nextcloud: "nextcloud", } // RequiredOptions must have these fields set for minimum viable config RequiredOptions = []string{"oauth.provider", "oauth.client_id"} // RootDir is where Vouch Proxy looks for ./config/config.yml, ./data, ./static and ./templates RootDir string // CmdLine command line arguments CmdLine = &cmdLineFlags{ IsHealthCheck: flag.Bool("healthcheck", false, "invoke healthcheck (check process return value)"), logLevel: flag.String("loglevel", "", "enable debug log output"), port: flag.Int("port", -1, "port"), configFile: flag.String("config", "", "specify alternate config.yml file as command line arg"), } // Cfg the main exported config variable Cfg = &Config{} // IsHealthCheck see main.go IsHealthCheck = false )
Functions ¶
func InitForTestPurposes ¶ added in v0.5.8
func InitForTestPurposes()
InitForTestPurposes is called by most *_testing.go files in Vouch Proxy
func InitForTestPurposesWithProvider ¶ added in v0.7.0
func InitForTestPurposesWithProvider(provider string)
InitForTestPurposesWithProvider just for testing
func TestConfiguration ¶ added in v0.9.0
func TestConfiguration()
TestConfiguration Confirm the Configuration is valid
func UnmarshalKey ¶
UnmarshalKey populate struct from contents of cfg tree at key
Types ¶
type Config ¶ added in v0.9.0
type Config struct { Logger *zap.SugaredLogger FastLogger *zap.Logger AtomicLogLevel zap.AtomicLevel LogLevel string `mapstructure:"logLevel"` Listen string `mapstructure:"listen"` Port int `mapstructure:"port"` Domains []string `mapstructure:"domains"` WhiteList []string `mapstructure:"whitelist"` TeamWhiteList []string `mapstructure:"teamWhitelist"` AllowAllUsers bool `mapstructure:"allowAllUsers"` PublicAccess bool `mapstructure:"publicAccess"` JWT struct { MaxAge int `mapstructure:"maxAge"` Issuer string `mapstructure:"issuer"` Secret string `mapstructure:"secret"` Compress bool `mapstructure:"compress"` } Cookie struct { Name string `mapstructure:"name"` Domain string `mapstructure:"domain"` Secure bool `mapstructure:"secure"` HTTPOnly bool `mapstructure:"httpOnly"` MaxAge int `mapstructure:"maxage"` SameSite string `mapstructure:"sameSite"` } Headers struct { JWT string `mapstructure:"jwt"` User string `mapstructure:"user"` QueryString string `mapstructure:"querystring"` Redirect string `mapstructure:"redirect"` Success string `mapstructure:"success"` ClaimHeader string `mapstructure:"claimheader"` Claims []string `mapstructure:"claims"` AccessToken string `mapstructure:"accesstoken"` IDToken string `mapstructure:"idtoken"` } Session struct { Name string `mapstructure:"name"` Key string `mapstructure:"key"` } TestURL string `mapstructure:"test_url"` TestURLs []string `mapstructure:"test_urls"` Testing bool `mapstructure:"testing"` }
Config vouch jwt cookie configuration
Click to show internal directories.
Click to hide internal directories.