|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.struts2.interceptor.PrincipalProxy
public class PrincipalProxy
Proxy class used together with PrincipalAware interface. It allows to get indirect access to HttpServletRequest Principal related methods.
Constructor Summary | |
---|---|
PrincipalProxy(javax.servlet.http.HttpServletRequest request)
Constructs a proxy |
Method Summary | |
---|---|
java.lang.String |
getRemoteUser()
Gets the user id |
javax.servlet.http.HttpServletRequest |
getRequest()
Gets the request |
java.security.Principal |
getUserPrincipal()
Gets the user principal |
boolean |
isRequestSecure()
Is the request using https? |
boolean |
isUserInRole(java.lang.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 |
Constructor Detail |
---|
public PrincipalProxy(javax.servlet.http.HttpServletRequest request)
request
- The underlying requestMethod Detail |
---|
public boolean isUserInRole(java.lang.String role)
role
- The role
public java.security.Principal getUserPrincipal()
public java.lang.String getRemoteUser()
public boolean isRequestSecure()
public javax.servlet.http.HttpServletRequest getRequest()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |