Move Cipher intialisation to session store initialisation

This commit is contained in:
Joel Speed
2020-06-28 12:03:03 +01:00
parent d9af3ffc5e
commit c8dbf1cf60
7 changed files with 32 additions and 36 deletions
+2 -2
View File
@@ -126,9 +126,9 @@ func (s *SessionStore) makeCookie(req *http.Request, name string, value string,
// NewCookieSessionStore initialises a new instance of the SessionStore from
// the configuration given
func NewCookieSessionStore(opts *options.SessionOptions, cookieOpts *options.CookieOptions) (sessions.SessionStore, error) {
func NewCookieSessionStore(opts *options.SessionOptions, cookieOpts *options.CookieOptions, cipher encryption.Cipher) (sessions.SessionStore, error) {
return &SessionStore{
CookieCipher: opts.Cipher,
CookieCipher: cipher,
CookieOptions: cookieOpts,
}, nil
}