Class ServletPrincipalProxy
java.lang.Object
org.apache.struts2.interceptor.servlet.ServletPrincipalProxy
- All Implemented Interfaces:
- PrincipalProxy
PrincipalProxy implementation for using HttpServletRequest Principal related methods.
- 
Constructor SummaryConstructorsConstructorDescriptionServletPrincipalProxy(jakarta.servlet.http.HttpServletRequest request) Constructs a proxy
- 
Method SummaryModifier and TypeMethodDescriptionGets the user idGets the user principalbooleanIs the request using https?booleanisUserInRole(String role) True if the user is in the given role
- 
Constructor Details- 
ServletPrincipalProxypublic ServletPrincipalProxy(jakarta.servlet.http.HttpServletRequest request) Constructs a proxy- Parameters:
- request- The underlying request
 
 
- 
- 
Method Details- 
isUserInRoleTrue if the user is in the given role- Specified by:
- isUserInRolein interface- PrincipalProxy
- Parameters:
- role- The role
- Returns:
- True if the user is in that role
 
- 
getUserPrincipalGets the user principal- Specified by:
- getUserPrincipalin interface- PrincipalProxy
- Returns:
- The principal
 
- 
getRemoteUserGets the user id- Specified by:
- getRemoteUserin interface- PrincipalProxy
- Returns:
- The user id
 
- 
isRequestSecurepublic boolean isRequestSecure()Is the request using https?- Specified by:
- isRequestSecurein interface- PrincipalProxy
- Returns:
- True if using https
 
 
-