Documentation
¶
Index ¶
- Variables
- func InitPersistence(dataDir string)
- func LoadSessions() error
- func RemoveAllJWTTokens(username string) error
- func RemoveJWTToken(username, tokenToRemove string) error
- func RevokeLegacySession(username string, userSession *models.UserSession)
- func SaveSessions() error
- func UserSessionInit() map[string]*models.UserSession
- type PersistedSession
Constants ¶
This section is empty.
Variables ¶
View Source
var UserSessions map[string]*models.UserSession
Functions ¶
func InitPersistence ¶ added in v0.4.0
func InitPersistence(dataDir string)
InitPersistence sets up the persistence file path
func LoadSessions ¶ added in v0.4.0
func LoadSessions() error
LoadSessions loads user sessions from disk
func RemoveAllJWTTokens ¶ added in v0.4.0
func RemoveJWTToken ¶ added in v0.4.0
func RevokeLegacySession ¶ added in v0.4.0
func RevokeLegacySession(username string, userSession *models.UserSession)
RevokeLegacySession deletes the session entry and revokes legacy persistent token (subtype "user") Requires that userSession.JWTTokens is empty.
func UserSessionInit ¶
func UserSessionInit() map[string]*models.UserSession
Types ¶
type PersistedSession ¶ added in v0.4.0
type PersistedSession struct {
Username string `json:"username"`
JWTTokens []string `json:"jwt_tokens"`
NethCTIToken string `json:"nethcti_token"`
}
PersistedSession represents minimal session data needed for persistence
Click to show internal directories.
Click to hide internal directories.