A big refactoring for how sessions are handled, Api calls that authenticate with api key will no longer create a new session

This commit is contained in:
Torkel Ödegaard
2015-04-07 19:21:14 +02:00
parent 00a713c42e
commit c07d48d930
5 changed files with 192 additions and 61 deletions

View File

@@ -139,6 +139,6 @@ func loginUserWithUser(user *m.User, c *middleware.Context) {
func Logout(c *middleware.Context) {
c.SetCookie(setting.CookieUserName, "", -1, setting.AppSubUrl+"/")
c.SetCookie(setting.CookieRememberName, "", -1, setting.AppSubUrl+"/")
c.Session.Destory(c.Context)
c.Session.Destory(c)
c.Redirect(setting.AppSubUrl + "/login")
}