Documentation
¶
Index ¶
- Variables
- func AllowNonTlsConnections() func(p *ManagerParams)
- type Key
- type Manager
- func (m Manager) CreateSession(w http.ResponseWriter, ctx context.Context, key Key, session Session) error
- func (m Manager) EndSession(ctx context.Context, w http.ResponseWriter)
- func (m Manager) SessionFromContext(ctx context.Context) (Session, error)
- func (m Manager) WrapRequest(next http.Handler) http.Handler
- type ManagerParams
- type Option
- type Session
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoSessionFound = errors.New("no active session in request context")
Functions ¶
func AllowNonTlsConnections ¶
func AllowNonTlsConnections() func(p *ManagerParams)
AllowNonTlsConnections allows non-TLS connections for a session, removing the Secure attribute from session cookies.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func (Manager) CreateSession ¶
func (Manager) EndSession ¶
func (m Manager) EndSession(ctx context.Context, w http.ResponseWriter)
func (Manager) SessionFromContext ¶
type ManagerParams ¶
type ManagerParams struct {
RequireTLS bool
}
type Option ¶
type Option func(*ManagerParams)
Click to show internal directories.
Click to hide internal directories.