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

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


      logger.debug("Trying to set principal to new Principal with name="
          + 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);
View Full Code Here


        return true;
    }

    private void makePrincipal(String username, Attributes ldapAttributes)
            throws NamingException {
        principal = new UserPrincipal(username);
        NamingEnumeration<? extends Attribute> attributeList =
                ldapAttributes.getAll();
        while (attributeList.hasMore()) {
            Attribute attribute = attributeList.next();
            NamingEnumeration<?> values = attribute.getAll();
View Full Code Here

        if (!successLogin) {
            return false;
        }

        try {
            UserPrincipal p = new UserPrincipal(username);
            Set<String> roles = attributes.get("role");
            if (roles == null) {
                roles = new HashSet<String>();
                attributes.put("role", roles);
            }
View Full Code Here

                if (!a_username.equals(username)
                        || !a_password.equals(password)) {
                    continue;
                }

                principal = new UserPrincipal(username);

                // for a matched user, go through each attribute
                NodeList attributeList = user.getElementsByTagName("attribute");
                for (int y = 0; y < attributeList.getLength(); y++) {
                    Element attribute = (Element) attributeList.item(y);
View Full Code Here

TOP

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

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.