forked from jason/cpolis
Initial version of native session management
This commit is contained in:
@ -9,9 +9,9 @@ import (
|
||||
f "streifling.com/jason/cpolis/cmd/frontend"
|
||||
)
|
||||
|
||||
func ServeImage(c *b.Config, s *b.CookieStore) http.HandlerFunc {
|
||||
func ServeImage(c *b.Config, s map[string]*f.Session) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
if _, err := f.GetSession(w, r, c, s); err != nil {
|
||||
if _, err := f.ManageSession(w, r, c, s); err != nil {
|
||||
if !tokenIsVerified(w, r, c) {
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user