Class SecurityWebContextHelper
java.lang.Object
de.xima.fc.security.helper.SecurityWebContextHelper
Helper for dealing with request in formcycle.
- Since:
- 8.0.0
- Author:
- XIMA Media GmbH
-
Method Summary
Modifier and TypeMethodDescriptionstatic MandantgetClientByIdentifier(String clientIdentifier) static MandantgetClientFromRequest(javax.servlet.http.HttpServletRequest req) static StringgetClientNameFromRequest(org.pac4j.core.context.WebContext context) static VorganggetFormRecordFromRequest(javax.servlet.http.HttpServletRequest req) static FormVersiongetFormVersionFromRequest(javax.servlet.http.HttpServletRequest req) static ProjektgetProjectFromRequest(javax.servlet.http.HttpServletRequest req) static StringgetRequestBaseUrl(org.pac4j.core.context.WebContext webContext) Extracts the base URL from the given web context's request.static StringgetRequestedUrl(org.pac4j.core.context.WebContext context) getUser(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, IAuthenticationTarget target) static booleanisRequestedWebEndpointPublic(javax.servlet.http.HttpServletRequest request) Checks whether the requested web endpoint, if any, is publicly available without requiring authorization.
-
Method Details
-
getUser
public static Optional<IUser> getUser(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, IAuthenticationTarget target) -
getClientFromRequest
-
getClientByIdentifier
-
getProjectFromRequest
-
getFormVersionFromRequest
-
getFormRecordFromRequest
-
isRequestedWebEndpointPublic
public static boolean isRequestedWebEndpointPublic(javax.servlet.http.HttpServletRequest request) Checks whether the requested web endpoint, if any, is publicly available without requiring authorization.- Parameters:
request- A request to the webapp.- Returns:
trueif the requested web endpoint is publicly available andfalseotherwise.
-
getRequestedUrl
-
getRequestBaseUrl
Extracts the base URL from the given web context's request. This is the URL from the scheme, domain until with context path of the servlet containing, including the trailing slash. This is the value you could use in HTML<base>tag.- Parameters:
webContext- The web context.- Returns:
- The base URL of the request without trailing slash.
-
getClientNameFromRequest
-