Fix typos

This commit is contained in:
Thom Seddon 2019-07-08 17:21:08 +01:00
parent 5a676f3068
commit a99330e6b2
4 changed files with 7 additions and 7 deletions

View File

@ -293,7 +293,7 @@ The authenticated user is set in the `X-Forwarded-User` header, to pass this on
#### Overlay Mode
Overlay is the default operation mode, in this mode the authorisation endpoint is overlayed onto any domain. By default the `/_oauth` path is used, this can be customised using the `url-path` option.
Overlay is the default operation mode, in this mode the authorisation endpoint is overlaid onto any domain. By default the `/_oauth` path is used, this can be customised using the `url-path` option.
The user flow will be:

View File

@ -273,7 +273,7 @@ func cookieSignature(r *http.Request, email, expires string) string {
return base64.URLEncoding.EncodeToString(hash.Sum(nil))
}
// Get cookie expirary
// Get cookie expiry
func cookieExpiry() time.Time {
return time.Now().Local().Add(config.Lifetime)
}

View File

@ -48,7 +48,7 @@ type Config struct {
CookieDomainsLegacy CookieDomains `long:"cookie-domains" env:"COOKIE_DOMAINS" description:"DEPRECATED - Use \"cookie-domain\""`
CookieSecretLegacy string `long:"cookie-secret" env:"COOKIE_SECRET" description:"DEPRECATED - Use \"secret\"" json:"-"`
CookieSecureLegacy string `long:"cookie-secure" env:"COOKIE_SECURE" description:"DEPRECATED - Use \"insecure-cookie\""`
ClientIdLegacy string `long:"client-id" env:"CLIENT_ID" group:"DEPs" description:"DEPRECATED - Use \"providers.google.client-id\""`
ClientIdLegacy string `long:"client-id" env:"CLIENT_ID" description:"DEPRECATED - Use \"providers.google.client-id\""`
ClientSecretLegacy string `long:"client-secret" env:"CLIENT_SECRET" description:"DEPRECATED - Use \"providers.google.client-id\"" json:"-"`
PromptLegacy string `long:"prompt" env:"PROMPT" description:"DEPRECATED - Use \"providers.google.prompt\""`
}
@ -161,7 +161,7 @@ func (c *Config) parseFlags(args []string) error {
_, err := p.ParseArgs(args)
if err != nil {
return handlFlagError(err)
return handleFlagError(err)
}
return nil
@ -214,7 +214,7 @@ func (c *Config) parseUnknownFlag(option string, arg flags.SplitArgument, args [
case "provider":
rule.Provider = val
default:
return args, fmt.Errorf("inavlid route param: %v", option)
return args, fmt.Errorf("invalid route param: %v", option)
}
} else {
return args, fmt.Errorf("unknown flag: %v", option)
@ -223,7 +223,7 @@ func (c *Config) parseUnknownFlag(option string, arg flags.SplitArgument, args [
return args, nil
}
func handlFlagError(err error) error {
func handleFlagError(err error) error {
flagsErr, ok := err.(*flags.Error)
if ok && flagsErr.Type == flags.ErrHelp {
// Library has just printed cli help

View File

@ -273,7 +273,7 @@ func TestConfigParseEnvironmentBackwardsCompatability(t *testing.T) {
// "cookie-secure" used to be a standard go bool flag that could take
// true, TRUE, 1, false, FALSE, 0 etc. values.
// Here we're checking that format is still suppoted
// Here we're checking that format is still supported
assert.Equal("false", c.CookieSecureLegacy)
assert.True(c.InsecureCookie, "--cookie-secure=false should set insecure-cookie true")