Package org.jasig.cas.client.proxy

Examples of org.jasig.cas.client.proxy.EhcacheBackedProxyGrantingTicketStorageImpl


public class EhCacheBackedProxyGrantingTicketStorageImplTests extends TestCase {

    public void testEncryptionMechanisms() throws Exception {
        final Cache ehcache = new Cache("name", 100, false, false, 500, 500);
        CacheManager.getInstance().addCache(ehcache);
        final EhcacheBackedProxyGrantingTicketStorageImpl cache = new EhcacheBackedProxyGrantingTicketStorageImpl(
                ehcache);
        //        cache.setSecretKey("thismustbeatleast24charactersandcannotbelessthanthat1234");

        assertNull(cache.retrieve(null));
        assertNull(cache.retrieve("foobar"));

        cache.save("proxyGrantingTicketIou", "proxyGrantingTicket");
        assertEquals("proxyGrantingTicket", cache.retrieve("proxyGrantingTicketIou"));
        assertTrue("proxyGrantingTicket".equals(ehcache.get("proxyGrantingTicketIou").getValue()));
    }
View Full Code Here

TOP

Related Classes of org.jasig.cas.client.proxy.EhcacheBackedProxyGrantingTicketStorageImpl

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.