Uploaded image for project: 'Seam 2'
  1. Seam 2
  2. JBSEAM-967

JBoss Seam - Support authentication from a realm (on Tomcat)

    Details

    • Type: Feature Request
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Security
    • Labels:
      None

      Description

      Please see discussion in the JBoss forum reference.

      The idea is to allow the Seam Identity (security) component to get the Principal from the HttpServletRequest and to delegate the hasRole() calls to the HttpServletRequest as well. This is because, in my case, Tomcat has already forced the user to authenticate if necessary and the authentication, authorization information is available in the container's HttpServletRequest impl.

      Principal userPrincipal = httpServletRequest.getUserPrincipal();

      boolean hasRole(String roleName) {
      return httpServletRequest.isUserInRole(roleName);
      }

      public String getUsername() {
      return httpServletRequest.getRemoteUser();
      }

      public boolean isLoggedIn() {
      return httpServletRequest.getUserPrincipal() != null;
      }

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                shane.bryzak Shane Bryzak
                Reporter:
                bsmithjj Bradley Smith
              • Votes:
                2 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: