From aa0a725a3adf8735daa387becb7e83b843e34044 Mon Sep 17 00:00:00 2001 From: Jehiah Czebotar Date: Tue, 23 Jun 2015 14:01:05 -0400 Subject: [PATCH] Readme: doc updates --- README.md | 4 +++- main.go | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4cb2bc0..3dd94ea 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,8 @@ For Google, the registration steps are: * Fill in the necessary fields and Save (this is _required_) 5. Take note of the **Client ID** and **Client Secret** +It's recommended to refresh sessions on a short interval (1h) with `cookie-refresh` setting which validates that the account is still authorized. + ### GitHub Auth Provider 1. Create a new project: https://github.com/settings/developers @@ -100,7 +102,7 @@ Usage of oauth2_proxy: -cookie-expire=168h0m0s: expire timeframe for cookie -cookie-httponly=true: set HttpOnly cookie flag -cookie-key="_oauth2_proxy": the name of the cookie that the oauth_proxy creates - -cookie-refresh=0: refresh the cookie when less than this much time remains before expiration; 0 to disable + -cookie-refresh=0: refresh the cookie after this duration; 0 to disable -cookie-secret="": the seed string for secure cookies -cookie-secure=true: set secure (HTTPS) cookie flag -custom-templates-dir="": path to custom html templates diff --git a/main.go b/main.go index fb97e87..acf18fe 100644 --- a/main.go +++ b/main.go @@ -50,7 +50,7 @@ func main() { flagSet.String("cookie-secret", "", "the seed string for secure cookies") flagSet.String("cookie-domain", "", "an optional cookie domain to force cookies to (ie: .yourcompany.com)*") flagSet.Duration("cookie-expire", time.Duration(168)*time.Hour, "expire timeframe for cookie") - flagSet.Duration("cookie-refresh", time.Duration(0), "refresh the cookie when less than this much time remains before expiration; 0 to disable") + flagSet.Duration("cookie-refresh", time.Duration(0), "refresh the cookie after this duration; 0 to disable") flagSet.Bool("cookie-secure", true, "set secure (HTTPS) cookie flag") flagSet.Bool("cookie-httponly", true, "set HttpOnly cookie flag")