Class SessionManager
java.lang.Object
com.developer.nefarious.zjoule.plugin.auth.SessionManager
Manages the user's session within the application.
The
SessionManager
class provides static methods for login, logout,
and session state verification. It interacts with various memory components
and the browser to manage user sessions.-
Method Summary
Modifier and TypeMethodDescriptionstatic void
static boolean
static boolean
static boolean
static void
login
(org.eclipse.swt.browser.Browser browser) Executes the login process using the specified browser.static void
logout
(org.eclipse.swt.browser.Browser browser, EclipseMemory eclipseMemory) Executes the logout process using the specified browser and clears all memory.
-
Method Details
-
isUserLoggedIn
public static boolean isUserLoggedIn() -
isSapSession
public static boolean isSapSession() -
isOllamaSession
public static boolean isOllamaSession() -
login
public static void login(org.eclipse.swt.browser.Browser browser) Executes the login process using the specified browser. This method triggers the `login()` JavaScript function in the browser and updates the associated tags using theTagHandler
.- Parameters:
browser
- theBrowser
instance to execute the login process.
-
logout
Executes the logout process using the specified browser and clears all memory. The method triggers the `logout()` JavaScript function in the browser and clears all user-related data from theEclipseMemory
.- Parameters:
browser
- theBrowser
instance to execute the logout process. If the browser is null or disposed, no JavaScript execution occurs.eclipseMemory
- theEclipseMemory
instance used to clear all memory.
-
clearAllSessions
public static void clearAllSessions()
-