auth
auth/authorize.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/authorize.go Sat Aug 16 18:05:55 2014 -0400 1.2 +++ b/authorize.go Sat Aug 16 20:02:52 2014 -0400 1.3 @@ -148,7 +148,7 @@ 1.4 } 1.5 1.6 if err := validateSession(r, ctx); err == ErrorNotAuthenticated { 1.7 - ctx.RenderLogin(w, r) 1.8 + // TODO: redirect to login 1.9 return 1.10 } else if err != nil { 1.11 ctx.RenderError(w, err) 1.12 @@ -201,7 +201,7 @@ 1.13 } 1.14 1.15 if err := validateSession(r, ctx); err == ErrorNotAuthenticated { 1.16 - ctx.RenderLogin(w, r) 1.17 + // TODO: redirect to login 1.18 return 1.19 } else if err != nil { 1.20 ctx.RenderError(w, err)