Платформа ЦРНП "Мирокод" для разработки проектов
https://git.mirocod.ru
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
621 B
24 lines
621 B
// Copyright 2020 The Gitea Authors. All rights reserved. |
|
// Use of this source code is governed by a MIT-style |
|
// license that can be found in the LICENSE file. |
|
|
|
package session |
|
|
|
import ( |
|
"net/http" |
|
|
|
"gitea.com/go-chi/session" |
|
) |
|
|
|
// Store represents a session store |
|
type Store interface { |
|
Get(interface{}) interface{} |
|
Set(interface{}, interface{}) error |
|
Delete(interface{}) error |
|
} |
|
|
|
// RegenerateSession regenerates the underlying session and returns the new store |
|
func RegenerateSession(resp http.ResponseWriter, req *http.Request) (Store, error) { |
|
s, err := session.RegenerateSession(resp, req) |
|
return s, err |
|
}
|
|
|