Package org.fcrepo.server.security.jaas.auth

Examples of org.fcrepo.server.security.jaas.auth.AuthHttpServletRequestWrapper


          + principalNames[0]);

      // get name of principal and inject it into request
      // we use here a FeSL implementation of java.security.Principal
      UserPrincipal principal = new UserPrincipal(principalNames[0]);
      AuthHttpServletRequestWrapper authRequest = new AuthHttpServletRequestWrapper(
          req);
      authRequest.setUserPrincipal(principal);

      logger.debug("Principal has been set to " + principal);

      // can inject other attributes
      authRequest.setAttribute(FEDORA_ATTRIBUTES_KEY, subjectAttributes);
      if (logger.isDebugEnabled()) {
        logger.debug("Added " + subjectAttributes + " to "
            + FEDORA_ATTRIBUTES_KEY);
      }
      if (chain != null)
View Full Code Here


        // obtain the user roles from the subject and add to servlet.
        Set<String> userRoles = getUserRoles(subject);

        // wrap the request in one that has the ability to store role
        // and principal information and store this information.
        AuthHttpServletRequestWrapper authRequest =
                new AuthHttpServletRequestWrapper(req);
        authRequest.setUserPrincipal(userPrincipal);
        authRequest.setUserRoles(userRoles);

        // add the roles that were obtained to the Subject.
        addRolesToSubject(subject, userRoles);

        // populate FEDORA_AUX_SUBJECT_ATTRIBUTES with fedoraRole
View Full Code Here

TOP

Related Classes of org.fcrepo.server.security.jaas.auth.AuthHttpServletRequestWrapper

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.