Package org.pac4j.cas.credentials

Examples of org.pac4j.cas.credentials.CasCredentials


    protected CasCredentials retrieveCredentials(final WebContext context) throws RequiresHttpAction {
        // like the SingleSignOutFilter from CAS client :
        if (this.logoutHandler.isTokenRequest(context)) {
            final String ticket = context.getRequestParameter(SERVICE_TICKET_PARAMETER);
            this.logoutHandler.recordSession(context, ticket);
            final CasCredentials casCredentials = new CasCredentials(ticket, getName());
            logger.debug("casCredentials : {}", casCredentials);
            return casCredentials;
        } else if (this.logoutHandler.isLogoutRequest(context)) {
            this.logoutHandler.destroySession(context);
            final String message = "logout request : no credential returned";
View Full Code Here


       
        final WebContext context = new J2EContext(request, response);
       
        final Client<CasCredentials, CasProfile> client = this.clients.findClient(context);
       
        CasCredentials credentials = null;
        try {
            credentials = client.getCredentials(context);
        } catch (final RequiresHttpAction e) {
        }
        // has credentials
View Full Code Here

        assertFalse(context.getResponseLocation().indexOf("gateway=true") >= 0);
        casClient.setGateway(true);
        casClient.reinit();
        casClient.redirect(context, false, false);
        assertTrue(context.getResponseLocation().indexOf("gateway=true") >= 0);
        final CasCredentials credentials = casClient.getCredentials(context);
        assertNull(credentials);
    }
View Full Code Here

TOP

Related Classes of org.pac4j.cas.credentials.CasCredentials

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.