Package org.pac4j.cas.client

Examples of org.pac4j.cas.client.CasClient


    private static final CasProtocol CAS_PROTOCOL = CasProtocol.SAML;
   
    protected abstract CasProtocol getCasProtocol();
   
    public void testClone() {
        final CasClient oldClient = new CasClient();
        oldClient.setCasLoginUrl(CAS_LOGIN_URL);
        oldClient.setCasPrefixUrl(CAS_PREFIX_URL);
        oldClient.setCasProtocol(CAS_PROTOCOL);
        oldClient.setRenew(true);
        oldClient.setGateway(true);
        oldClient.setAcceptAnyProxy(true);
        final ProxyList proxyList = new ProxyList();
        oldClient.setAllowedProxyChains(proxyList);
        final CasProxyReceptor casProxyReceptor = new CasProxyReceptor();
        oldClient.setCasProxyReceptor(casProxyReceptor);
        final CasClient client = (CasClient) internalTestClone(oldClient);
        assertEquals(oldClient.getCasLoginUrl(), client.getCasLoginUrl());
        assertEquals(oldClient.getCasPrefixUrl(), client.getCasPrefixUrl());
        assertEquals(oldClient.getCasProtocol(), client.getCasProtocol());
        assertEquals(true, client.isRenew());
        assertEquals(true, client.isGateway());
        assertEquals(true, client.isAcceptAnyProxy());
        assertEquals(oldClient.getAllowedProxyChains(), client.getAllowedProxyChains());
        assertEquals(oldClient.getCasProxyReceptor(), client.getCasProxyReceptor());
    }
View Full Code Here


    }
   
    @SuppressWarnings("rawtypes")
    @Override
    protected Client getClient() {
        final CasClient casClient = new CasClient();
        casClient.setCallbackUrl(PAC4J_BASE_URL);
        casClient.setCasLoginUrl("http://localhost:8080/cas/login");
        casClient.setCasProtocol(getCasProtocol());
        return casClient;
    }
View Full Code Here

    private static final String CAS_BASE_URL = "http://localhost:8080/cas/";
   
    private static final String SERVICE_URL = "http://www.pac4j.org/";
   
    public CallbackController() {
        final CasClient casClient = new CasClient();
        casClient.setCasLoginUrl(CAS_BASE_URL + "login");
        casClient.setCasProtocol(CasProtocol.CAS20);
        final CasProxyReceptor casProxyReceptor = new CasProxyReceptor();
        casClient.setCasProxyReceptor(casProxyReceptor);
        this.clients.setCallbackUrl(CAS_BASE_URL + "callback");
        this.clients.setClients(casClient, casProxyReceptor);
        this.clients.init();
    }
View Full Code Here

    }
   
    @SuppressWarnings("rawtypes")
    @Override
    protected Client getClient() {
        this.casClient = new CasClient();
        this.casClient.setCallbackUrl(CALLBACK_URL + this.casClient.getName());
        this.casClient.setCasLoginUrl(CAS_URL + "login");
        this.casClient.setCasProtocol(getCasProtocol());
        this.casClient.setAcceptAnyProxy(true);
        return this.casClient;
View Full Code Here

TOP

Related Classes of org.pac4j.cas.client.CasClient

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.