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 StringbuildContentPath(String contentUrl, EUserPortalContentTypeModel userPortalContentType)Builds the content path for the given content URL and content type.StringbuildFormPath(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.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.Optional<IUserPortalUser>user()Gets the currently authenticated user, if any.
-
-
-
Method Detail
-
user
public Optional<IUserPortalUser> user()
Description copied from interface:IUserPortalUserManagerGets the currently authenticated user, if any.- Specified by:
userin interfaceIUserPortalUserManager- Returns:
- The currently authenticated user, if any.
-
setSessionData
public void setSessionData(String key, Serializable value)
Description copied from interface:IUserPortalUserManagerSets the session data for the given key.- Specified by:
setSessionDatain 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:IUserPortalUserManagerGets the session data for the given key.- Specified by:
getSessionDatain 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:IUserPortalUserManagerSets the form access cookie for the given form path.- Specified by:
buildFormPathin interfaceIUserPortalUserManager- Parameters:
formPath- The path of the form to set the access cookie for.
-
buildContentPath
public String buildContentPath(String contentUrl, EUserPortalContentTypeModel userPortalContentType)
Description copied from interface:IUserPortalUserManagerBuilds the content path for the given content URL and content type.- Specified by:
buildContentPathin interfaceIUserPortalUserManager- Parameters:
contentUrl- The content URL.userPortalContentType- The content type.- Returns:
- The built content path.
-
login
public void login(String clientName, AuthenticationTokenResponse tokenResponse, boolean isMfaAuthenticated)
Description copied from interface:IUserPortalUserManagerLogs in a user with the given token response.- Specified by:
loginin 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:IUserPortalUserManagerLogs out the currently authenticated user.- Specified by:
logoutin interfaceIUserPortalUserManager
-
-