diff options
author | Hank Shen <swhbox@foxmail.com> | 2020-06-15 11:35:17 +0300 |
---|---|---|
committer | Hank Shen <swhbox@foxmail.com> | 2020-06-15 11:35:17 +0300 |
commit | 1b04690a969647deb18118c68bb1724ba1698dab (patch) | |
tree | e6faac6c35c3f55a775cc28e25dd480e485ad6c4 /store.go | |
parent | 61ae93e6ea22407566ba751bae9ef079f89aa646 (diff) |
update
Diffstat (limited to 'store.go')
-rw-r--r-- | store.go | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -30,8 +30,7 @@ type Store interface { New(ctx echo.Context, name string) (*Session, error) // Save should persist session to the underlying store implementation. - // @param args:maxAge(seconds),path(/),domain,secure,httpOnly,sameSite(lax/strict/default) - Save(ctx echo.Context, s *Session, args ...interface{}) error + Save(ctx echo.Context, s *Session) error } // CookieStore ---------------------------------------------------------------- @@ -96,13 +95,13 @@ func (s *CookieStore) New(ctx echo.Context, name string) (*Session, error) { } // Save adds a single session to the response. -func (s *CookieStore) Save(ctx echo.Context, session *Session, args ...interface{}) error { +func (s *CookieStore) Save(ctx echo.Context, session *Session) error { encoded, err := securecookie.EncodeMulti(session.Name(), session.Values, s.Codecs...) if err != nil { return err } - SetCookie(ctx, session.Name(), encoded, args...) + SetCookie(ctx, session.Name(), encoded) return nil } @@ -190,7 +189,7 @@ func (s *FilesystemStore) New(ctx echo.Context, name string) (*Session, error) { } // Save adds a single session to the response. -func (s *FilesystemStore) Save(ctx echo.Context, session *Session, args ...interface{}) error { +func (s *FilesystemStore) Save(ctx echo.Context, session *Session) error { // Delete if max-age is < 0 if ctx.CookieOptions().MaxAge < 0 { if err := s.erase(session); err != nil { @@ -214,7 +213,7 @@ func (s *FilesystemStore) Save(ctx echo.Context, session *Session, args ...inter if err != nil { return err } - SetCookie(ctx, session.Name(), encoded, args...) + SetCookie(ctx, session.Name(), encoded) return nil } |