Package org.jasig.cas.client.jaas

Examples of org.jasig.cas.client.jaas.AssertionPrincipal


                if (!new WebAuthentication().login(service, ticket)) {
                    logger.debug("JBoss Web authentication failed.");
                    throw new GeneralSecurityException("JBoss Web authentication failed.");
                }
                if (request.getUserPrincipal() instanceof AssertionPrincipal) {
                    final AssertionPrincipal principal = (AssertionPrincipal) request.getUserPrincipal();
                    logger.debug("Installing CAS assertion into session.");
                    request.getSession().setAttribute(CONST_CAS_ASSERTION, principal.getAssertion());
                } else {
                    logger.debug("Aborting -- principal is not of type AssertionPrincipal");
                    throw new GeneralSecurityException(
                            "JBoss Web authentication did not produce CAS AssertionPrincipal.");
                }
View Full Code Here


    private Object[] getTestSubjects() {
        final SimplePrincipal simplePrincipal = new SimplePrincipal("simple");
        final SimpleGroup simpleGroup = new SimpleGroup("group");
        final AttributePrincipalImpl attributePrincipal = new AttributePrincipalImpl("attr",
                Collections.<String, Object> singletonMap("LOA", "3"));
        final AssertionPrincipal assertionPrincipal = new AssertionPrincipal("assertion", new AssertionImpl(
                attributePrincipal, Collections.<String, Object> singletonMap("authenticationMethod", "username")));

        return new Object[] { simplePrincipal, simpleGroup, attributePrincipal, assertionPrincipal, };
    }
View Full Code Here

TOP

Related Classes of org.jasig.cas.client.jaas.AssertionPrincipal

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.