Examples of supports()


Examples of org.springframework.security.access.vote.RoleVoter.supports()

        }
    }

    public void testRoleVoterAlwaysReturnsTrueToSupports() {
        RoleVoter rv = new RoleVoter();
        assertTrue(rv.supports(String.class));
    }

    public void testWillNotStartIfDecisionVotersNotSet()
        throws Exception {
        MockDecisionManagerImpl mock = new MockDecisionManagerImpl();

Examples of org.springframework.security.authentication.AnonymousAuthenticationProvider.supports()

    public void testIgnoresClassesItDoesNotSupport() throws Exception {
        AnonymousAuthenticationProvider aap = new AnonymousAuthenticationProvider();
        aap.setKey("qwerty");

        TestingAuthenticationToken token = new TestingAuthenticationToken("user", "password", "ROLE_A");
        assertFalse(aap.supports(TestingAuthenticationToken.class));

        // Try it anyway
        assertNull(aap.authenticate(token));
    }

Examples of org.springframework.security.authentication.RememberMeAuthenticationProvider.supports()

    public void testIgnoresClassesItDoesNotSupport() throws Exception {
        RememberMeAuthenticationProvider aap = new RememberMeAuthenticationProvider();
        aap.setKey("qwerty");

        TestingAuthenticationToken token = new TestingAuthenticationToken("user", "password","ROLE_A");
        assertFalse(aap.supports(TestingAuthenticationToken.class));

        // Try it anyway
        assertNull(aap.authenticate(token));
    }

Examples of org.springframework.security.authentication.TestingAuthenticationProvider.supports()

        assertTrue(AuthorityUtils.authorityListToSet(castResult.getAuthorities()).contains("ROLE_TWO"));
    }

    public void testSupports() {
        TestingAuthenticationProvider provider = new TestingAuthenticationProvider();
        assertTrue(provider.supports(TestingAuthenticationToken.class));
        assertTrue(!provider.supports(String.class));
    }
}

Examples of org.springframework.security.web.access.channel.ChannelDecisionManagerImpl.supports()

        list.add(cpXyz);
        list.add(cpAbc);
        cdm.setChannelProcessors(list);
        cdm.afterPropertiesSet();

        assertTrue(cdm.supports(new SecurityConfig("xyz")));
        assertTrue(cdm.supports(new SecurityConfig("abc")));
        assertFalse(cdm.supports(new SecurityConfig("UNSUPPORTED")));
    }

    public void testGettersSetters() {

Examples of org.springframework.security.web.access.channel.ChannelDecisionManagerImpl.supports()

        list.add(cpAbc);
        cdm.setChannelProcessors(list);
        cdm.afterPropertiesSet();

        assertTrue(cdm.supports(new SecurityConfig("xyz")));
        assertTrue(cdm.supports(new SecurityConfig("abc")));
        assertFalse(cdm.supports(new SecurityConfig("UNSUPPORTED")));
    }

    public void testGettersSetters() {
        ChannelDecisionManagerImpl cdm = new ChannelDecisionManagerImpl();

Examples of org.springframework.security.web.access.channel.ChannelDecisionManagerImpl.supports()

        cdm.setChannelProcessors(list);
        cdm.afterPropertiesSet();

        assertTrue(cdm.supports(new SecurityConfig("xyz")));
        assertTrue(cdm.supports(new SecurityConfig("abc")));
        assertFalse(cdm.supports(new SecurityConfig("UNSUPPORTED")));
    }

    public void testGettersSetters() {
        ChannelDecisionManagerImpl cdm = new ChannelDecisionManagerImpl();
        assertNull(cdm.getChannelProcessors());

Examples of org.springframework.security.web.access.channel.InsecureChannelProcessor.supports()

        }
    }

    public void testSupports() {
        InsecureChannelProcessor processor = new InsecureChannelProcessor();
        assertTrue(processor.supports(new SecurityConfig("REQUIRES_INSECURE_CHANNEL")));
        assertFalse(processor.supports(null));
        assertFalse(processor.supports(new SecurityConfig("NOT_SUPPORTED")));
    }
}

Examples of org.springframework.security.web.access.channel.InsecureChannelProcessor.supports()

    }

    public void testSupports() {
        InsecureChannelProcessor processor = new InsecureChannelProcessor();
        assertTrue(processor.supports(new SecurityConfig("REQUIRES_INSECURE_CHANNEL")));
        assertFalse(processor.supports(null));
        assertFalse(processor.supports(new SecurityConfig("NOT_SUPPORTED")));
    }
}

Examples of org.springframework.security.web.access.channel.InsecureChannelProcessor.supports()

    public void testSupports() {
        InsecureChannelProcessor processor = new InsecureChannelProcessor();
        assertTrue(processor.supports(new SecurityConfig("REQUIRES_INSECURE_CHANNEL")));
        assertFalse(processor.supports(null));
        assertFalse(processor.supports(new SecurityConfig("NOT_SUPPORTED")));
    }
}
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.