Interface IUserPortalUserManager
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
UserPortalUserManager
Common interface for a manager that handles the user portal session.
- Since:
- 8.2.0
- Author:
- XIMA MEDIA GmbH
-
Method Summary
Modifier and TypeMethodDescriptionbuildFormPath(String formPath) Sets the form access cookie for the given form path.getSessionData(String key) Gets the session data for the given key.voidlogin(String clientName, AuthenticationTokenResponse tokenResponse, boolean isMfaAuthenticated) Logs in a user with the given token response.voidlogout()Logs out the currently authenticated user.voidsetSessionData(String key, Serializable value) Sets the session data for the given key.user()Gets the currently authenticated user, if any.
-
Method Details
-
user
Optional<IUserPortalUser> user()Gets the currently authenticated user, if any.- Returns:
- The currently authenticated user, if any.
-
setSessionData
Sets the session data for the given key.- Parameters:
key- The key to set the session data for.value- The value to set the session data to.
-
getSessionData
-
buildFormPath
Sets the form access cookie for the given form path.- Parameters:
formPath- The path of the form to set the access cookie for.- Throws:
IllegalArgumentException- If the form path is invalid.
-
login
void login(String clientName, AuthenticationTokenResponse tokenResponse, boolean isMfaAuthenticated) Logs in a user with the given token response.- Parameters:
clientName- The name of the pac4j client that was used for logging in.tokenResponse- The token response to use for logging in.isMfaAuthenticated- Whether the user has been authenticated via multi-factor authentication (MFA).
-
logout
void logout()Logs out the currently authenticated user.
-