Package org.springframework.security.cas.authentication

Examples of org.springframework.security.cas.authentication.CasAssertionAuthenticationToken


        attributes.put("d", null);
        attributes.put("someother", "unused");
        when(assertion.getPrincipal()).thenReturn(principal);
        when(principal.getAttributes()).thenReturn(attributes);
        when(principal.getName()).thenReturn("somebody");
        CasAssertionAuthenticationToken token = new CasAssertionAuthenticationToken(assertion, "ticket");
        UserDetails user = uds.loadUserDetails(token);
        Set<String> roles = AuthorityUtils.authorityListToSet(user.getAuthorities());
        assertTrue(roles.size() == 4);
        assertTrue(roles.contains("role_a1"));
        assertTrue(roles.contains("role_a2"));
View Full Code Here

TOP

Related Classes of org.springframework.security.cas.authentication.CasAssertionAuthenticationToken

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.