Versions in this module Expand all Collapse all v0 v0.14.0 Apr 24, 2024 v0.13.0 Feb 27, 2024 Changes in this version + var FeatureId = security.FeatureId("Session", security.FeatureOrderSession) + var Module = &bootstrap.Module + func Deserialize(src io.Reader, dst interface{}) error + func GobRegister() + func MustSet(c context.Context, s *Session) + func NewCookie(name, value string, options *Options, r *http.Request) *http.Cookie + func Serialize(src interface{}) ([]byte, error) + func Set(c context.Context, s *Session) error + type ChangeSessionHandler struct + func (h *ChangeSessionHandler) HandleAuthenticationSuccess(c context.Context, r *http.Request, rw http.ResponseWriter, ...) + func (h *ChangeSessionHandler) PriorityOrder() int + type ConcurrentSessionHandler struct + func (h *ConcurrentSessionHandler) HandleAuthenticationSuccess(c context.Context, _ *http.Request, _ http.ResponseWriter, ...) + func (h *ConcurrentSessionHandler) PriorityOrder() int + type Configurer struct + func (sc *Configurer) Apply(feature security.Feature, ws security.WebSecurity) error + type DebugAuthErrorHandler struct + func (h *DebugAuthErrorHandler) HandleAuthenticationError(_ context.Context, _ *http.Request, _ http.ResponseWriter, err error) + type DebugAuthSuccessHandler struct + func (h *DebugAuthSuccessHandler) HandleAuthenticationSuccess(_ context.Context, _ *http.Request, _ http.ResponseWriter, ...) + type DefaultSettingService struct + func (d *DefaultSettingService) GetMaximumSessions(ctx context.Context) int + type DeleteSessionOnLogoutHandler struct + func (h *DeleteSessionOnLogoutHandler) HandleAuthenticationSuccess(c context.Context, _ *http.Request, _ http.ResponseWriter, ...) + type Feature struct + func Configure(ws security.WebSecurity) *Feature + func New() *Feature + func (f *Feature) Identifier() security.FeatureIdentifier + func (f *Feature) SessionName(sessionName string) *Feature + func (f *Feature) SettingService(settingService SettingService) *Feature + type Manager struct + func NewManager(sessionName string, store Store) *Manager + func (m *Manager) AuthenticationPersistenceHandlerFunc() gin.HandlerFunc + func (m *Manager) SessionHandlerFunc() gin.HandlerFunc + type Options struct + AbsoluteTimeout time.Duration + Domain string + HttpOnly bool + IdleTimeout time.Duration + MaxAge int + Path string + SameSite http.SameSite + Secure bool + type RedisStore struct + func NewRedisStore(redisClient redis.Client, options ...StoreOptions) *RedisStore + func (s *RedisStore) AddToPrincipalIndex(principal string, session *Session) error + func (s *RedisStore) ChangeId(session *Session) error + func (s *RedisStore) FindByPrincipalName(principal string, sessionName string) ([]*Session, error) + func (s *RedisStore) Get(id string, name string) (*Session, error) + func (s *RedisStore) Invalidate(sessions ...*Session) error + func (s *RedisStore) InvalidateByPrincipalName(principal, sessionName string) error + func (s *RedisStore) New(name string) (*Session, error) + func (s *RedisStore) Options() *Options + func (s *RedisStore) RemoveFromPrincipalIndex(principal string, session *Session) error + func (s *RedisStore) Save(session *Session) error + func (s *RedisStore) WithContext(ctx context.Context) Store + type Session struct + func CreateSession(store Store, name string) *Session + func Get(c context.Context) *Session + func NewSession(store Store, name string) *Session + func (s *Session) AddFlash(value interface{}, flashKey ...string) + func (s *Session) ChangeId() error + func (s *Session) Clear() + func (s *Session) Delete(key interface{}) + func (s *Session) ExpireNow(ctx context.Context) error + func (s *Session) Flash(key string) (ret interface{}) + func (s *Session) Flashes(flashKey ...string) []interface{} + func (s *Session) Get(key interface{}) interface{} + func (s *Session) GetID() string + func (s *Session) IsDirty() bool + func (s *Session) Name() string + func (s *Session) Save() (err error) + func (s *Session) Set(key interface{}, val interface{}) + func (s *Session) SetDirty() + type SettingService interface + GetMaximumSessions func(ctx context.Context) int + func NewDefaultSettingService(p security.SessionProperties) SettingService + type Store interface + AddToPrincipalIndex func(principal string, session *Session) error + ChangeId func(s *Session) error + FindByPrincipalName func(principal string, sessionName string) ([]*Session, error) + Get func(id string, name string) (*Session, error) + Invalidate func(sessions ...*Session) error + InvalidateByPrincipalName func(principal, sessionName string) error + New func(name string) (*Session, error) + Options func() *Options + RemoveFromPrincipalIndex func(principal string, sessions *Session) error + Save func(s *Session) error + WithContext func(ctx context.Context) Store + type StoreOption struct + SettingReader security.GlobalSettingReader + type StoreOptions func(opt *StoreOption)