Documentation ¶
Index ¶
Constants ¶
View Source
const (
MiddlewareDependencySession = "*sessionmw.SessionMiddleware"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type SessionIDStore ¶
type SessionMiddleware ¶
type SessionMiddleware struct {
// contains filtered or unexported fields
}
func New ¶
func New(prefix string, expiresAfter time.Duration) *SessionMiddleware
New creates a session middleware.
The prefix is an optional prefix for the cookie name. The cookie name after the prefix is "_SESSION". The key holds the secret key to sign and verify the cookies. The cookie URL determines the domain and the path parts of the HTTP cookie that will be set. It can be nil. If the cookie URL starts with https://, then the cookie will be forced to work only on HTTPS. The expiresAfter sets a duration for the cookies to expire.
func (*SessionMiddleware) ConfigSchema ¶
func (s *SessionMiddleware) ConfigSchema() map[string]reflect.Type
func (*SessionMiddleware) Dependencies ¶
func (s *SessionMiddleware) Dependencies() []string
Click to show internal directories.
Click to hide internal directories.