|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.struts2.servlet.interceptor.ServletPrincipalProxy
public class ServletPrincipalProxy
PrincipalProxy implementation for using HttpServletRequest Principal related methods.
Field Summary | |
---|---|
private HttpServletRequest |
request
|
Constructor Summary | |
---|---|
ServletPrincipalProxy(HttpServletRequest request)
Constructs a proxy |
Method Summary | |
---|---|
String |
getRemoteUser()
Gets the user id |
HttpServletRequest |
getRequest()
Deprecated. To obtain the HttpServletRequest in your action, use org.apache.struts2.servlet.ServletRequestAware , since this method will be dropped in future. |
Principal |
getUserPrincipal()
Gets the user principal |
boolean |
isRequestSecure()
Is the request using https? |
boolean |
isUserInRole(String role)
True if the user is in the given role |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private HttpServletRequest request
Constructor Detail |
---|
public ServletPrincipalProxy(HttpServletRequest request)
request
- The underlying requestMethod Detail |
---|
public boolean isUserInRole(String role)
isUserInRole
in interface PrincipalProxy
role
- The role
public Principal getUserPrincipal()
getUserPrincipal
in interface PrincipalProxy
public String getRemoteUser()
getRemoteUser
in interface PrincipalProxy
public boolean isRequestSecure()
isRequestSecure
in interface PrincipalProxy
public HttpServletRequest getRequest()
org.apache.struts2.servlet.ServletRequestAware
, since this method will be dropped in future.
getRequest
in interface PrincipalProxy
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |