Package org.opensaml.ws.transport.http

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


     * @param samlMsgCtx current message context
     *
     * @throws MessageDecodingException thrown if there is a problem decoding the TARGET parameter.
     */
    protected void decodeTarget(SAMLMessageContext samlMsgCtx) throws MessageDecodingException {
        HTTPInTransport inTransport = (HTTPInTransport) samlMsgCtx.getInboundMessageTransport();

        String target = DatatypeHelper.safeTrim(inTransport.getParameterValue("TARGET"));
        if (target == null) {
            log.error("URL TARGET parameter was missing or did not contain a value.");
            throw new MessageDecodingException("URL TARGET parameter was missing or did not contain a value.");
        }
        samlMsgCtx.setRelayState(target);
View Full Code Here


     * @param samlMsgCtx current message context
     *
     * @throws MessageDecodingException thrown if there is a problem decoding or dereferencing the artifacts
     */
    protected void processArtifacts(SAMLMessageContext samlMsgCtx) throws MessageDecodingException {
        HTTPInTransport inTransport = (HTTPInTransport) samlMsgCtx.getInboundMessageTransport();
        List<String> encodedArtifacts = inTransport.getParameterValues("SAMLart");
        if (encodedArtifacts == null || encodedArtifacts.size() == 0) {
            log.error("URL SAMLart parameter was missing or did not contain a value.");
            throw new MessageDecodingException("URL SAMLart parameter was missing or did not contain a value.");
        }
       
View Full Code Here

     * @param context context to populate ID for
     * @throws MetadataProviderException in case provided IDP value is invalid
     */
    protected void populatePeerEntityId(SAMLMessageContext context) throws MetadataProviderException {

        HTTPInTransport inTransport = (HTTPInTransport) context.getInboundMessageTransport();
        String entityId;

        entityId = (String) inTransport.getAttribute(org.springframework.security.saml.SAMLConstants.PEER_ENTITY_ID);
        if (entityId != null) { // Pre-configured entity Id
            logger.debug("Using protocol specified IDP {}", entityId);
        } else {
            entityId = inTransport.getParameterValue(SAMLEntryPoint.IDP_PARAMETER);
            if (entityId != null) { // IDP from request
                logger.debug("Using user specified IDP {} from request", entityId);
                context.setPeerUserSelected(true);
            } else { // Default IDP
                entityId = metadata.getDefaultIDP();
View Full Code Here

     * @throws MetadataProviderException in case entityId can't be populated
     */
    protected void populateLocalEntityId(SAMLMessageContext context, String requestURI) throws MetadataProviderException {

        String entityId;
        HTTPInTransport inTransport = (HTTPInTransport) context.getInboundMessageTransport();

        // Pre-configured entity Id
        entityId = (String) inTransport.getAttribute(org.springframework.security.saml.SAMLConstants.LOCAL_ENTITY_ID);
        if (entityId != null) {
            logger.debug("Using protocol specified SP {}", entityId);
            context.setLocalEntityId(entityId);
            context.setLocalEntityRole(SPSSODescriptor.DEFAULT_ELEMENT_NAME);
            return;
View Full Code Here

        sb.append(result);

        // Log peer address
        sb.append(";");
        if (context.getInboundMessageTransport() != null) {
            HTTPInTransport transport = (HTTPInTransport) context.getInboundMessageTransport();
            sb.append(transport.getPeerAddress());
        }

        // Log local entity ID
        sb.append(";");
        if (context.getLocalEntityId() != null) {
View Full Code Here

     *
     * @param context context with request and response included
     * @return true if this HttpRequest is a response from IDP discovery profile.
     */
    private boolean isDiscoResponse(SAMLMessageContext context) {
        HTTPInTransport request = (HTTPInTransport) context.getInboundMessageTransport();
        String disco = request.getParameterValue(DISCOVERY_RESPONSE_PARAMETER);
        return (disco != null && disco.toLowerCase().trim().equals("true"));
    }
View Full Code Here

        if (!(samlMessageContext.getInboundMessageTransport() instanceof HTTPInTransport)) {
            log.error("Invalid inbound message transport type, this decoder only support HTTPInTransport");
            throw new MessageDecodingException("Invalid inbound message transport type, this decoder only support HTTPInTransport");
        }

        HTTPInTransport inTransport = (HTTPInTransport) samlMessageContext.getInboundMessageTransport();
        HTTPOutTransport outTransport = (HTTPOutTransport) samlMessageContext.getOutboundMessageTransport();

        /*
         * Artifact parameter.
         */
        String artifactId = DatatypeHelper.safeTrimOrNullString(inTransport.getParameterValue("SAMLart"));
        if (artifactId == null) {
            log.error("SAMLart parameter was missing or did not contain a value.");
            throw new MessageDecodingException("SAMLArt parameter was missing or did not contain a value.");
        }

        log.debug("Artifact id: {}", artifactId);

        /*
         * Relay state parameter.
         */
        samlMessageContext.setRelayState(inTransport.getParameterValue("RelayState"));

        log.debug("Decoded RelayState: {}", samlMessageContext.getRelayState());

        SAMLObject message = resolutionProfile.resolveArtifact(samlMessageContext, artifactId, getActualReceiverEndpointURI(samlMessageContext));

View Full Code Here

TOP

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

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.