sessionmanager

package
v0.0.0-...-1599866 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2019 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SessionManager

type SessionManager struct {
	// contains filtered or unexported fields
}

SessionManager represents a list of sessions connected with a UserManager

func NewSessionManager

func NewSessionManager(um *usermanager.UserManager) *SessionManager

NewSessionManager returns new SessionManager

func (*SessionManager) Cleanup

func (sm *SessionManager) Cleanup()

Cleanup deletes all timedout sessions

func (*SessionManager) NewSession

func (sm *SessionManager) NewSession(user string) (string, error)

NewSession returns a new session id and registers the new session

func (*SessionManager) UseSession

func (sm *SessionManager) UseSession(sess string) (*user.User, error)

UseSession triggers session usage

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL