Skip to content

Commit

Permalink
consent: allow Max-Age to be set to 0 by RememberFor option
Browse files Browse the repository at this point in the history
Signed-off-by: Bastian Hofmann <bastian.hofmann@joblocal.de>
  • Loading branch information
Bastian Hofmann committed Jul 16, 2018
1 parent f029101 commit a0b87d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion consent/strategy_default.go
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ func (s *DefaultStrategy) verifyAuthentication(w http.ResponseWriter, r *http.Re
}

cookie.Values[cookieAuthenticationSIDName] = sid
if session.RememberFor > 0 {
if session.RememberFor >= 0 {
cookie.Options.MaxAge = session.RememberFor
}
cookie.Options.HttpOnly = true
Expand Down

0 comments on commit a0b87d8

Please sign in to comment.