mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2026-09-30 03:31:27 +02:00
Manage session time fields centrally
This commit is contained in:
@@ -36,8 +36,7 @@ type SessionStore struct {
|
||||
// within Cookies set on the HTTP response writer
|
||||
func (s *SessionStore) Save(rw http.ResponseWriter, req *http.Request, ss *sessions.SessionState) error {
|
||||
if ss.CreatedAt == nil || ss.CreatedAt.IsZero() {
|
||||
now := time.Now()
|
||||
ss.CreatedAt = &now
|
||||
ss.CreatedAtNow()
|
||||
}
|
||||
value, err := s.cookieForSession(ss)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user