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

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getRemoteUser()` Gets the user id
    `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

- - ### Method Detail

    - #### isUserInRole

          boolean isUserInRole(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

          Principal getUserPrincipal()

      Gets the user principal
      Returns:
        The principal

    - #### getRemoteUser

          String getRemoteUser()

      Gets the user id
      Returns:
        The user id

    - #### isRequestSecure

          boolean isRequestSecure()

      Is the request using https?
      Returns:
        True if using https

Copyright © 2000–2026 Apache Software Foundation. All rights reserved.