Package org.opensaml.ws.transport.http

Examples of org.opensaml.ws.transport.http.HttpServletRequestAdapter


            log.debug("Invalid inbound message transport type, this rule only supports HttpServletRequestAdapter");
            return;
        }

        SAMLMessageContext samlMsgCtx = (SAMLMessageContext) messageContext;
        HttpServletRequestAdapter requestAdapter = (HttpServletRequestAdapter) messageContext
                .getInboundMessageTransport();
        HttpServletRequest request = requestAdapter.getWrappedRequest();

        if (!ruleHandles(request, samlMsgCtx)) {
            log.debug("Rule can not handle this request, skipping processing");
            return;
        }
View Full Code Here


       
        httpRequest = new MockHttpServletRequest();
        httpRequest.setMethod("POST");
       
        messageContext = new SAMLMessageContext();
        messageContext.setInboundMessageTransport(new HttpServletRequestAdapter(httpRequest));
       
        decoder = new HTTPPAOS11Decoder();
    }
View Full Code Here

        expect(request.getAttribute(org.springframework.security.saml.SAMLConstants.LOCAL_ENTITY_ID)).andReturn(null).anyTimes();
        expect(request.getContextPath()).andReturn("/");
        replyMock();

        samlContext = contextProvider.getLocalAndPeerEntity(request, response);
        samlContext.setInboundMessageTransport(new HttpServletRequestAdapter(request));
        samlContext.setOutboundMessageTransport(new HttpServletResponseAdapter(response, false));

        verifyMock();

        expect(response.getOutputStream()).andReturn(output).anyTimes();
View Full Code Here

     */
    @Test
    public void testGETDecoder() throws Exception {
        prepareHttpRequest("message/SAMLResponse.xml", "GET", "http://localhost:8080/url", "text/html");
        replayMock();
        MessageDecoder decoder = processor.getBinding(new HttpServletRequestAdapter(request)).getMessageDecoder();
        verifyMock();
        assertNotNull(decoder);
    }
View Full Code Here

     */
    @Test(expected = SAMLException.class)
    public void testUnknownDecoder() throws Exception {
        prepareHttpRequest("message/SAMLResponse.xml", "HEAD", "http://localhost:8080/url", "application/json");
        replayMock();
        MessageDecoder decoder = processor.getBinding(new HttpServletRequestAdapter(request)).getMessageDecoder();
        verifyMock();
        assertNotNull(decoder);
    }
View Full Code Here

        metadata.setIdpDiscoveryEnabled(true);
        metadata.setIdpDiscoveryURL("http://test.fi/idpDisco/");
        context.setLocalExtendedMetadata(metadata);
        context.setLocalEntityId("localId");

        context.setInboundMessageTransport(new HttpServletRequestAdapter(request));
        context.setOutboundMessageTransport(new HttpServletResponseAdapter(response, false));

        response.sendRedirect("http://test.fi/idpDisco/?entityID=localId&returnIDParam=idp");

        replayMock();
View Full Code Here

        metadata.setIdpDiscoveryEnabled(true);
        metadata.setIdpDiscoveryURL("test.fi/idpDisco/");
        context.setLocalExtendedMetadata(metadata);
        context.setLocalEntityId("localId");

        context.setInboundMessageTransport(new HttpServletRequestAdapter(request));
        context.setOutboundMessageTransport(new HttpServletResponseAdapter(response, false));

        replayMock();
        entryPoint.initializeDiscovery(context);
        verifyMock();
View Full Code Here

        expect(request.getContextPath()).andReturn("/");

        replyMock();

        samlContext = contextProvider.getLocalAndPeerEntity(request, response);
        samlContext.setInboundMessageTransport(new HttpServletRequestAdapter(request));
        samlContext.setOutboundMessageTransport(new HttpServletResponseAdapter(response, false));

        verifyMock();

        expect(response.getOutputStream()).andReturn(output).anyTimes();
View Full Code Here

    }

    @Override
    public boolean supports(InTransport transport) {
      if (transport instanceof HttpServletRequestAdapter) {
          HttpServletRequestAdapter t = (HttpServletRequestAdapter) transport;
          HttpServletRequest request = t.getWrappedRequest();
          return "POST".equalsIgnoreCase(t.getHTTPMethod())
                && request.getContentType().startsWith(
                        org.springframework.security.saml.SAMLConstants.PAOS_HTTP_ACCEPT_HEADER);
      } else {
          return false;
      }
View Full Code Here

            log.debug("Invalid inbound message transport type, this rule only supports HttpServletRequestAdapter");
            return;
        }

        SAMLMessageContext samlMsgCtx = (SAMLMessageContext) messageContext;
        HttpServletRequestAdapter requestAdapter = (HttpServletRequestAdapter) messageContext
                .getInboundMessageTransport();
        HttpServletRequest request = requestAdapter.getWrappedRequest();

        if (!ruleHandles(request, samlMsgCtx)) {
            log.debug("Rule can not handle this request, skipping processing");
            return;
        }
View Full Code Here

TOP

Related Classes of org.opensaml.ws.transport.http.HttpServletRequestAdapter

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.