Examples of UserPrincipalImpl


Examples of org.apache.jetspeed.security.impl.UserPrincipalImpl

    {
        UserPrincipal userPrincipal = null;
        InternalUserPrincipal internalUser = securityAccess.getInternalUserPrincipal(username, false);
        if (null != internalUser)
        {
            userPrincipal = new UserPrincipalImpl(UserPrincipalImpl.getPrincipalNameFromFullPath(internalUser.getFullPath()));
        }
        return userPrincipal;
    }
View Full Code Here

Examples of org.apache.jetspeed.security.impl.UserPrincipalImpl

            String path = internalUser.getFullPath();
            if (path == null)
            {
                continue;
            }
            userPrincipals.add(new UserPrincipalImpl(UserPrincipalImpl.getPrincipalNameFromFullPath(internalUser.getFullPath())));
        }
        return userPrincipals;
    }
View Full Code Here

Examples of org.apache.jetspeed.security.impl.UserPrincipalImpl

            // reset page manager cache
            pageManager.reset();
           
            // setup test subjects
            Principal userPrincipal = new UserPrincipalImpl("admin");
            Principal rolePrincipal = new RolePrincipalImpl("admin");
            Set principals = new PrincipalsSet();
            principals.add(userPrincipal);
            principals.add(rolePrincipal);
            Subject adminSubject = new Subject(true, principals, new HashSet(), new HashSet());
           
            userPrincipal = new UserPrincipalImpl("user");
            principals = new PrincipalsSet();
            principals.add(userPrincipal);
            Subject userSubject = new Subject(true, principals, new HashSet(), new HashSet());
           
            userPrincipal = new UserPrincipalImpl("manager");
            rolePrincipal = new RolePrincipalImpl("manager");
            principals = new PrincipalsSet();
            principals.add(userPrincipal);
            principals.add(rolePrincipal);
            Subject managerSubject = new Subject(true, principals, new HashSet(), new HashSet());

            userPrincipal = new UserPrincipalImpl("guest");
            principals = new PrincipalsSet();
            principals.add(userPrincipal);
            Subject guestSubject = new Subject(true, principals, new HashSet(), new HashSet());

            // setup test as admin user
View Full Code Here

Examples of org.apache.jetspeed.security.impl.UserPrincipalImpl

        {
            String dn = ldap.lookupByUid(uid);

            if (!StringUtils.isEmpty(dn))
            {
                return new UserPrincipalImpl(uid);
            }
        }
        catch (SecurityException e)
        {
            logSecurityException(e, uid);
View Full Code Here

Examples of org.apache.jetspeed.security.impl.UserPrincipalImpl

        for (int i = 0; i < fullPaths.length; i++)
        {
            String[] usersInGroup = userDao.getUserUidsForGroup(fullPaths[i]);
            for (int y = 0; y < usersInGroup.length; y++)
            {
                Principal userPrincipal = new UserPrincipalImpl(usersInGroup[y]);
                userPrincipals.add(userPrincipal);
            }
        }
    }
View Full Code Here

Examples of org.apache.jetspeed.security.impl.UserPrincipalImpl

        for (int i = 0; i < fullPaths.length; i++)
        {
            String[] usersInRole = userDao.getUserUidsForRole(fullPaths[i]);
            for (int y = 0; y < usersInRole.length; y++)
            {
                Principal userPrincipal = new UserPrincipalImpl(usersInRole[y]);
                userPrincipals.add(userPrincipal);
            }
        }
    }   
View Full Code Here

Examples of org.apache.jetspeed.security.impl.UserPrincipalImpl

            // reset page manager cache
            pageManager.reset();
           
            // setup test subjects
            Principal userPrincipal = new UserPrincipalImpl("admin");
            Principal rolePrincipal = new RolePrincipalImpl("admin");
            Set principals = new PrincipalsSet();
            principals.add(userPrincipal);
            principals.add(rolePrincipal);
            Subject adminSubject = new Subject(true, principals, new HashSet(), new HashSet());
           
            userPrincipal = new UserPrincipalImpl("user");
            principals = new PrincipalsSet();
            principals.add(userPrincipal);
            Subject userSubject = new Subject(true, principals, new HashSet(), new HashSet());
           
            userPrincipal = new UserPrincipalImpl("manager");
            rolePrincipal = new RolePrincipalImpl("manager");
            principals = new PrincipalsSet();
            principals.add(userPrincipal);
            principals.add(rolePrincipal);
            Subject managerSubject = new Subject(true, principals, new HashSet(), new HashSet());

            userPrincipal = new UserPrincipalImpl("guest");
            principals = new PrincipalsSet();
            principals.add(userPrincipal);
            Subject guestSubject = new Subject(true, principals, new HashSet(), new HashSet());

            // setup test as admin user
View Full Code Here

Examples of org.apache.jetspeed.security.impl.UserPrincipalImpl

     * @param principalUid The principal uid.
     * @return A group principal object.
     */
    protected Principal makePrincipal(String principalUid)
    {
        return new UserPrincipalImpl(principalUid);
    }
View Full Code Here

Examples of org.apache.jetspeed.security.impl.UserPrincipalImpl

        principals.add(rolePrincipal1);
        principals.add(rolePrincipal2);
        principals.add(rolePrincipal3);
       
        // create the user principal
        Principal userPrincipal = new UserPrincipalImpl("david");       
        principals.add(userPrincipal);
       
        // create the subject
        Subject subject = new Subject(true, principals, new HashSet(), new HashSet());
View Full Code Here

Examples of org.apache.jetspeed.security.impl.UserPrincipalImpl

   * @param principalUid The principal uid.
   * @return A group principal object.
   */
  protected Principal makePrincipal(String principalUid)
  {
      return new UserPrincipalImpl(principalUid);
  }   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.