Package de.xima.fc.user_portal.session
Interface IUserPortalUserManager
-
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
UserPortalUserManager
public interface IUserPortalUserManager extends Serializable
Common interface for a manager that handles the user portal session.- Since:
- 8.2.0
- Author:
- XIMA MEDIA GmbH
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
buildFormPath(String formPath)
Sets the form access cookie for the given form path.Optional<Object>
getSessionData(String key)
Gets the session data for the given key.void
login(String clientName, de.xima.fc.api.rest.pub.client.security.model.AuthenticationTokenResponse tokenResponse, boolean isMfaAuthenticated)
Logs in a user with the given token response.void
logout()
Logs out the currently authenticated user.void
setSessionData(String key, Serializable value)
Sets the session data for the given key.Optional<IUserPortalUser>
user()
Gets the currently authenticated user, if any.
-
-
-
Method Detail
-
user
Optional<IUserPortalUser> user()
Gets the currently authenticated user, if any.- Returns:
- The currently authenticated user, if any.
-
setSessionData
void setSessionData(String key, Serializable value)
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
Optional<Object> getSessionData(String key)
Gets the session data for the given key.- Parameters:
key
- The key to get the session data for.- Returns:
- The session data for the given key.
-
buildFormPath
String buildFormPath(String formPath)
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, de.xima.fc.api.rest.pub.client.security.model.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.
-
-