auth
auth/config.go
Implement session management and move login. Add a session store interface to validate and retrieve data about sessions. Implement session management in endpoints that need session support. Move the login functionality from inlined into the OAuth flow into its own handler, that the OAuth flow will redirect to. The login functionality should take a redirect URL parameter to return to the OAuth flow when login is completed.
1.1 --- a/config.go Sat Aug 16 18:05:55 2014 -0400 1.2 +++ b/config.go Sat Aug 16 20:02:52 2014 -0400 1.3 @@ -1,5 +1,7 @@ 1.4 package auth 1.5 1.6 +import "time" 1.7 + 1.8 // AllowedAuthorizeType is a collection of allowed auth request types 1.9 type AllowedAuthorizeType []AuthorizeRequestType 1.10 1.11 @@ -56,6 +58,9 @@ 1.12 1.13 // The base path of documentation 1.14 DocumentationDomain string 1.15 + 1.16 + SessionLength time.Duration 1.17 + RequestIPHeader string 1.18 } 1.19 1.20 // NewServerConfig returns a new ServerConfig with default configuration