store

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2025 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

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 RemoveAllJWTTokens(username string) error

func RemoveJWTToken added in v0.4.0

func RemoveJWTToken(username, tokenToRemove string) error

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 SaveSessions added in v0.4.0

func SaveSessions() error

Saves current user sessions to disk

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

Jump to

Keyboard shortcuts

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