Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.struts2.interceptor
Interface PrincipalProxy

All Known Implementing Classes:
  ServletPrincipalProxy

    public interface PrincipalProxy

Proxy interface used together with PrincipalAware interface. It allows indirect access to HttpServletRequest or PortletRequest Principal related methods.

Method Summary
`java.lang.String` | `getRemoteUser()` Gets the user id
`javax.servlet.http.HttpServletRequest` | `getRequest()` Deprecated. To obtain the HttpServletRequest in your action, use `org.apache.struts2.servlet.ServletRequestAware`, since this method will be dropped in future.
`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

Method Detail

### isUserInRole

    boolean isUserInRole(java.lang.String role)

  True if the user is in the given role

  Parameters:
    `role` - The role
  Returns:
    True if the user is in that role

### getUserPrincipal

    java.security.Principal getUserPrincipal()

  Gets the user principal

  Returns:
    The principal

### getRemoteUser

    java.lang.String getRemoteUser()

  Gets the user id

  Returns:
    The user id

### isRequestSecure

    boolean isRequestSecure()

  Is the request using https?

  Returns:
    True if using https

### getRequest

    javax.servlet.http.HttpServletRequest getRequest()

  Deprecated. To obtain the HttpServletRequest in your action, use `org.apache.struts2.servlet.ServletRequestAware`, since this method will be dropped in future.

  Gets the request.

  Returns:
    The request

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.