Examples of UserPrincipalImpl


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

            principal = new RolePrincipalImpl(name);
        }
        else if (fullPath.startsWith(BasePrincipal.PREFS_USER_ROOT))
        {
            String name = UserPrincipalImpl.getPrincipalNameFromFullPath(fullPath);
            principal = new UserPrincipalImpl(name);
        }
        else if (fullPath.startsWith(BasePrincipal.PREFS_GROUP_ROOT))
        {
            String name = GroupPrincipalImpl.getPrincipalNameFromFullPath(fullPath);           
            principal = new GroupPrincipalImpl(name);
View Full Code Here

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

    {
        Set principals = new PrincipalsSet();
        Set publicCredentials = new HashSet();
        Set privateCredentials = new HashSet();
       
        principals.add(new UserPrincipalImpl("david"));
        principals.add(new RolePrincipalImpl("ATP"));
        principals.add(new RolePrincipalImpl("NB"));       
        principals.add(new RolePrincipalImpl("ATP-NB"));       
        Subject subject = new Subject(true, principals, publicCredentials, privateCredentials);       
        return subject;
View Full Code Here

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

    {
        Set principals = new PrincipalsSet();
        Set publicCredentials = new HashSet();
        Set privateCredentials = new HashSet();
       
        principals.add(new UserPrincipalImpl("david"));
        principals.add(new RolePrincipalImpl("ATP"));
        principals.add(new RolePrincipalImpl("NB"));       
        Subject subject = new Subject(true, principals, publicCredentials, privateCredentials);       
        return subject;
    }
View Full Code Here

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

        assertNotNull("Default profiling rule is null", rule);
        assertTrue("default rule unexpected, = " + rule.getId(), rule.getId().equals(DEFAULT_RULE));
        assertTrue("default rule class not mapped", rule instanceof StandardProfilingRule);

        // Test anonymous principal-rule
        ProfilingRule anonRule = profiler.getRuleForPrincipal(new UserPrincipalImpl("anon"),
                ProfileLocator.PAGE_LOCATOR);
        assertNotNull("anonymous rule is null", anonRule);
        assertTrue("anonymous rule is j1", anonRule.getId().equals(DEFAULT_RULE));

        // Test Retrieving All Rules
View Full Code Here

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

    }

    public void testGetLocatorNames() throws Exception
    {
        assertNotNull("profiler service is null", profiler);
        String[] result = profiler.getLocatorNamesForPrincipal(new UserPrincipalImpl("guest"));
        for (int ix = 0; ix < result.length; ix++)
        {
            System.out.println("$$$ result = " + result[ix]);
            assertTrue("locator name = " + result[ix], result[ix].equals("page"));
        }
View Full Code Here

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

    {
        RequestContext request = new MockRequestContext("/");
        Set principals = new PrincipalsSet();
        Set publicCredentials = new HashSet();
        Set privateCredentials = new HashSet();       
        principals.add(new UserPrincipalImpl("user"));
        principals.add(new RolePrincipalImpl("role"));
        request.setSubject(new Subject(true, principals, publicCredentials, privateCredentials));
        request.setLocale(new Locale("en", "US"));
        MockHttpServletRequest servletRequest = new MockHttpServletRequest();
        servletRequest.setServerName("www.domain.com");
View Full Code Here

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

            principal = new GroupPrincipalImpl(name);
        }
        else
        {
            name = fullPath.substring(USER_PATH.length());
            principal = new UserPrincipalImpl(name);
        }
        // Create Subject
        Set principals = new HashSet();
        principals.add(principal);
View Full Code Here

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

            principal = new GroupPrincipalImpl(name);
        }
        else
        {
            name = fullPath.substring(USER_PATH.length());
            principal = new UserPrincipalImpl(name);
        }
        // Create Subject
        Set principals = new HashSet();
        principals.add(principal);
View Full Code Here

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

    {
        Set principals = new PrincipalsSet();
        Set publicCredentials = new HashSet();
        Set privateCredentials = new HashSet();
       
        principals.add(new UserPrincipalImpl("david"));
        principals.add(new RolePrincipalImpl("ATP"));
        principals.add(new RolePrincipalImpl("NB"));       
        principals.add(new RolePrincipalImpl("ATP-NB"));       
        Subject subject = new Subject(true, principals, publicCredentials, privateCredentials);       
        return subject;
View Full Code Here

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

    {
        Set principals = new PrincipalsSet();
        Set publicCredentials = new HashSet();
        Set privateCredentials = new HashSet();
       
        principals.add(new UserPrincipalImpl("david"));
        principals.add(new RolePrincipalImpl("ATP"));
        principals.add(new RolePrincipalImpl("NB"));       
        Subject subject = new Subject(true, principals, publicCredentials, privateCredentials);       
        return subject;
    }
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.