Package org.jasig.portal

Examples of org.jasig.portal.ChannelRuntimeData


        String service = "http://www.someschool.edu/someservice";
       
        // in absence of CAS security context, return descriptor unchanged
        assertEquals(service, connectionContext.getDescriptor(service));
       
        ChannelRuntimeData runtimeData = new ChannelRuntimeData();
        runtimeData.setHttpRequestMethod("GET");
       
       
        String descriptorWithRuntimeData =
            connectionContext.getDescriptor(service, runtimeData);
       
        // in absence of CAS security context, return descriptor unchanged.
        assertEquals(service, descriptorWithRuntimeData);
   
        runtimeData.setHttpRequestMethod("POST");
       
        // when method is POST, return descriptor unchanged
        descriptorWithRuntimeData =
            connectionContext.getDescriptor(service, runtimeData);
       
View Full Code Here


        String service = "http://www.someschool.edu/someservice";
       
        // in absence of authenticated CAS security context, return descriptor unchanged
        assertEquals(service, connectionContext.getDescriptor(service));
       
        ChannelRuntimeData runtimeData = new ChannelRuntimeData();
        runtimeData.setHttpRequestMethod("GET");
       
       
        String descriptorWithRuntimeData =
            connectionContext.getDescriptor(service, runtimeData);
       
        // in absence of authenticated CAS security context, return descriptor unchanged.
        assertEquals(service, descriptorWithRuntimeData);
   
        runtimeData.setHttpRequestMethod("POST");
       
        // when method is POST, return descriptor unchanged
        descriptorWithRuntimeData =
            connectionContext.getDescriptor(service, runtimeData);
       
View Full Code Here

        assertEquals(expectedResponse, connectionContext.getDescriptor(serviceOne));
       
//      the descriptor presented to the cas security context was the service.
        assertEquals(serviceOne, (String) mockCasContext.getServiceTokenTargets().get(0));
       
        ChannelRuntimeData runtimeData = new ChannelRuntimeData();
        runtimeData.setHttpRequestMethod("GET");
       
       
        String serviceTwo = "https://www.ja-sig.org/somepath?queryParamsPresent=true";
        String expectedResponseTwo = "https://www.ja-sig.org/somepath?queryParamsPresent=true&ticket=proxyTicket2";
        String descriptorWithRuntimeData =
View Full Code Here

        CasConnectionContext connectionContext = new CasConnectionContext();
        connectionContext.init(staticData);
       
        String serviceOne = "http://www.uportal.org/someservice";
       
        ChannelRuntimeData runtimeData = new ChannelRuntimeData();
       
        runtimeData.setHttpRequestMethod("POST");
       
        // when method is POST, return descriptor unchanged
        String descriptorWithRuntimeData =
            connectionContext.getDescriptor(serviceOne, runtimeData);
       
View Full Code Here

        assertEquals(expectedResponse, connectionContext.getDescriptor(serviceOne));
       
        // the descriptor presented to the cas security context was the statically defined URI.
        assertEquals(staticallyDefinedUri, (String) mockCasContext.getServiceTokenTargets().get(0));
       
        ChannelRuntimeData runtimeData = new ChannelRuntimeData();
        runtimeData.setHttpRequestMethod("GET");
       
       
        String serviceTwo = "https://www.ja-sig.org/somepath?queryParamsPresent=true";
        String expectedResponseTwo = "https://www.ja-sig.org/somepath?queryParamsPresent=true&ticket=proxyTicket2";
        String descriptorWithRuntimeData =
View Full Code Here

        staticData.setPerson(person);
       
        CasConnectionContext connectionContext = new CasConnectionContext();
        connectionContext.init(staticData);

        ChannelRuntimeData withoutParameter = new ChannelRuntimeData();
       
        // when the "cw_xml" parameter is neither present in ChannelRuntimeData nor
        // in ChannelStaticData, the CasConnectionContext acquires a ticket for the
        // null service
        assertEquals("ticket=proxyTicket1", connectionContext.getPostData(withoutParameter));
        assertEquals(null, mockCasContext.getServiceTokenTargets().get(0));
       
       
        ChannelRuntimeData withParameter = new ChannelRuntimeData();
        String runtimeService = "http://baseactionurl.blogspot.com/2005/12/ja-sig-facebook.html";
        withParameter.setParameter("cw_xml", runtimeService);
       
        // read the cw_xml parameter from ChannelRuntimeData
        assertEquals("ticket=proxyTicket2", connectionContext.getPostData(withParameter));
        assertEquals(runtimeService, mockCasContext.getServiceTokenTargets().get(1));
       
View Full Code Here

       
        final IPortletEntityId portletEntityId = new MockPortletEntityId("entityId1");
        final IPortletWindowId portletWindowId = new MockPortletWindowId("windowId1");
        final IPortletWindow portletWindow = new MockPortletWindow(portletWindowId, portletEntityId, "portletApp", "portletName");
       
        final ChannelRuntimeData channelRuntimeData = new ChannelRuntimeData();
        channelRuntimeData.setBaseActionURL("base/action.url");
       
        request.setAttribute(IPortletAdaptor.ATTRIBUTE__RUNTIME_DATA, channelRuntimeData);
       
        MockPortletEntity portletEntity = new MockPortletEntity();
        portletEntity.setPortletEntityId(portletEntityId);
View Full Code Here

        final IPortletEntityId portletEntityId2 = new MockPortletEntityId("eId2");
        final IPortletWindowId portletWindowId2 = new MockPortletWindowId("wId2");
        final MockPortletWindow portletWindow2 = new MockPortletWindow(portletWindowId2, portletEntityId2, "portletAppB", "portletNameB");

       
        final ChannelRuntimeData channelRuntimeData = new ChannelRuntimeData();
        channelRuntimeData.setBaseActionURL("base/action.url");
       
        request.setAttribute(IPortletAdaptor.ATTRIBUTE__RUNTIME_DATA, channelRuntimeData);
       
        final MockPortletEntity portletEntity1 = new MockPortletEntity();
        portletEntity1.setPortletEntityId(portletEntityId1);
View Full Code Here

        final IPortletEntityId portletEntityId2 = new MockPortletEntityId("eId2");
        final IPortletWindowId portletWindowId2 = new MockPortletWindowId("wId2");
        final MockPortletWindow portletWindow2 = new MockPortletWindow(portletWindowId2, portletEntityId2, "portletAppB", "portletNameB");

       
        final ChannelRuntimeData channelRuntimeData = new ChannelRuntimeData();
        channelRuntimeData.setBaseActionURL("base/action.url");
       
        request.setAttribute(IPortletAdaptor.ATTRIBUTE__RUNTIME_DATA, channelRuntimeData);
       
        final MockPortletEntity portletEntity1 = new MockPortletEntity();
        portletEntity1.setPortletEntityId(portletEntityId1);
View Full Code Here

        final IPortletEntityId portletEntityId3 = new MockPortletEntityId("eId3");
        final IPortletWindowId portletWindowId3 = new MockPortletWindowId("wId3");
        final MockPortletWindow portletWindow3 = new MockPortletWindow(portletWindowId3, portletEntityId3, "portletAppC", "portletNameC");

       
        final ChannelRuntimeData channelRuntimeData = new ChannelRuntimeData();
        channelRuntimeData.setBaseActionURL("base/action.url");
       
        request.setAttribute(IPortletAdaptor.ATTRIBUTE__RUNTIME_DATA, channelRuntimeData);
       
        final MockPortletEntity portletEntity1 = new MockPortletEntity();
        portletEntity1.setPortletEntityId(portletEntityId1);
View Full Code Here

TOP

Related Classes of org.jasig.portal.ChannelRuntimeData

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.