Documentation ¶
Index ¶
- Variables
- type Persistor
- type PwHasher
- type UserSessionInMemory
- func (us UserSessionInMemory) ClearAllSessionsForUser(userId string) error
- func (us UserSessionInMemory) ClearSessionById(token string) error
- func (us UserSessionInMemory) GetSession(token string) (s types.Session, err error)
- func (us UserSessionInMemory) NewSession(user types.User, organization types.Organization, userAgent string, ...) (s types.Session)
- func (us UserSessionInMemory) ReplaceSession(token string, session types.Session) (s types.Session)
- func (us UserSessionInMemory) SessionsForUser(userId string) (s []types.Session)
- func (us UserSessionInMemory) TTL() time.Duration
- func (us UserSessionInMemory) UpdateAllSessionsForUser(userId string, user types.User) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFound = errors.New("Session not found") ErrSessionExpired = errors.New("Session is expired") )
Functions ¶
This section is empty.
Types ¶
type PwHasher ¶
type PwHasher struct {
// contains filtered or unexported fields
}
func NewPwHasher ¶
type UserSessionInMemory ¶
type UserSessionInMemory struct { types.UserSessionOptions // contains filtered or unexported fields }
func NewUserSessionInMemory ¶
func NewUserSessionInMemory(options types.UserSessionOptions, tokenCreator func() string, persistor Persistor) (UserSessionInMemory, error)
func (UserSessionInMemory) ClearAllSessionsForUser ¶
func (us UserSessionInMemory) ClearAllSessionsForUser(userId string) error
func (UserSessionInMemory) ClearSessionById ¶ added in v0.8.1
func (us UserSessionInMemory) ClearSessionById(token string) error
func (UserSessionInMemory) GetSession ¶
func (us UserSessionInMemory) GetSession(token string) (s types.Session, err error)
func (UserSessionInMemory) NewSession ¶
func (us UserSessionInMemory) NewSession(user types.User, organization types.Organization, userAgent string, opts ...types.UserSessionOptions) (s types.Session)
func (UserSessionInMemory) ReplaceSession ¶ added in v0.8.0
func (UserSessionInMemory) SessionsForUser ¶
func (us UserSessionInMemory) SessionsForUser(userId string) (s []types.Session)
func (UserSessionInMemory) TTL ¶
func (us UserSessionInMemory) TTL() time.Duration
func (UserSessionInMemory) UpdateAllSessionsForUser ¶ added in v0.8.0
func (us UserSessionInMemory) UpdateAllSessionsForUser(userId string, user types.User) error
Click to show internal directories.
Click to hide internal directories.