Examples of EhcacheBackedProxyGrantingTicketStorageImpl


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
Copyright © 2018 www.massapi.com. 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.