Class UserPortalUserManager
- java.lang.Object
-
- de.xima.fc.user_portal.integration.security.user.UserPortalUserManager
-
- All Implemented Interfaces:
IUserPortalUserManager
,Serializable
@Named @RequestScoped public class UserPortalUserManager extends Object implements IUserPortalUserManager
- Since:
- 8.2.0
- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description UserPortalUserManager(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
-
Method Summary
All Methods Instance Methods Concrete 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
public Optional<IUserPortalUser> user()
Description copied from interface:IUserPortalUserManager
Gets the currently authenticated user, if any.- Specified by:
user
in interfaceIUserPortalUserManager
- Returns:
- The currently authenticated user, if any.
-
setSessionData
public void setSessionData(String key, Serializable value)
Description copied from interface:IUserPortalUserManager
Sets the session data for the given key.- Specified by:
setSessionData
in interfaceIUserPortalUserManager
- Parameters:
key
- The key to set the session data for.value
- The value to set the session data to.
-
getSessionData
public Optional<Object> getSessionData(String key)
Description copied from interface:IUserPortalUserManager
Gets the session data for the given key.- Specified by:
getSessionData
in interfaceIUserPortalUserManager
- Parameters:
key
- The key to get the session data for.- Returns:
- The session data for the given key.
-
buildFormPath
public String buildFormPath(String formPath)
Description copied from interface:IUserPortalUserManager
Sets the form access cookie for the given form path.- Specified by:
buildFormPath
in interfaceIUserPortalUserManager
- Parameters:
formPath
- The path of the form to set the access cookie for.
-
login
public void login(String clientName, de.xima.fc.api.rest.pub.client.security.model.AuthenticationTokenResponse tokenResponse, boolean isMfaAuthenticated)
Description copied from interface:IUserPortalUserManager
Logs in a user with the given token response.- Specified by:
login
in interfaceIUserPortalUserManager
- 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
public void logout()
Description copied from interface:IUserPortalUserManager
Logs out the currently authenticated user.- Specified by:
logout
in interfaceIUserPortalUserManager
-
-