remove encoding and decoding related items from request/response objects
authorlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Thu, 12 Apr 2007 20:41:26 +0000 (20:41 +0000)
committerlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Thu, 12 Apr 2007 20:41:26 +0000 (20:41 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@2174 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/edu/internet2/middleware/shibboleth/idp/profile/ShibbolethProfileRequest.java
src/edu/internet2/middleware/shibboleth/idp/profile/ShibbolethProfileResponse.java

index 5ece170..40bebfd 100644 (file)
@@ -18,9 +18,7 @@ package edu.internet2.middleware.shibboleth.idp.profile;
 
 import javax.servlet.http.HttpServletRequest;
 
-import org.opensaml.common.binding.BindingException;
 import org.opensaml.common.binding.MessageDecoder;
-import org.opensaml.xml.XMLObject;
 
 import edu.internet2.middleware.shibboleth.common.profile.ProfileRequest;
 import edu.internet2.middleware.shibboleth.common.relyingparty.RelyingPartyConfiguration;
@@ -33,18 +31,12 @@ import edu.internet2.middleware.shibboleth.idp.session.Session;
  */
 public class ShibbolethProfileRequest implements ProfileRequest<HttpServletRequest, Session> {
 
-    /** Decoder used to decode the incomming request. */
-    private MessageDecoder<HttpServletRequest> messageDecoder;
-
     /** The in comming request. */
     private HttpServletRequest rawRequest;
 
     /** Configuration information for the requesting party. */
     private RelyingPartyConfiguration rpConfiguration;
 
-    /** The decoded request message. */
-    private XMLObject decodedMessage;
-
     /** The current user session. */
     private Session userSession;
 
@@ -61,12 +53,6 @@ public class ShibbolethProfileRequest implements ProfileRequest<HttpServletReque
 
         rawRequest = request;
         userSession = sessionManager.getSession(request.getSession().getId());
-        messageDecoder = decoder;
-    }
-
-    /** {@inheritDoc} */
-    public MessageDecoder<HttpServletRequest> getMessageDecoder() {
-        return messageDecoder;
     }
 
     /** {@inheritDoc} */
@@ -80,16 +66,6 @@ public class ShibbolethProfileRequest implements ProfileRequest<HttpServletReque
     }
 
     /** {@inheritDoc} */
-    public synchronized XMLObject getRequest() throws BindingException{
-        if(decodedMessage == null){
-            messageDecoder.setRequest(rawRequest);
-            messageDecoder.decode();
-            decodedMessage = messageDecoder.getSAMLMessage();
-        }
-        return decodedMessage;
-    }
-
-    /** {@inheritDoc} */
     public Session getSession() {
         return userSession;
     }
index 8ed12ad..5daa220 100644 (file)
@@ -18,10 +18,7 @@ package edu.internet2.middleware.shibboleth.idp.profile;
 
 import javax.servlet.http.HttpServletResponse;
 
-import org.opensaml.common.SAMLObject;
-import org.opensaml.common.binding.BindingException;
 import org.opensaml.common.binding.MessageEncoder;
-import org.opensaml.xml.XMLObject;
 
 import edu.internet2.middleware.shibboleth.common.profile.ProfileResponse;
 
@@ -30,9 +27,6 @@ import edu.internet2.middleware.shibboleth.common.profile.ProfileResponse;
  */
 public class ShibbolethProfileResponse implements ProfileResponse<HttpServletResponse> {
 
-    /** Encoder used to send the response. */
-    private MessageEncoder<HttpServletResponse> messageEncoder;
-
     /** The outgoing response. */
     private HttpServletResponse rawResponse;
 
@@ -44,27 +38,10 @@ public class ShibbolethProfileResponse implements ProfileResponse<HttpServletRes
      */
     public ShibbolethProfileResponse(HttpServletResponse response, MessageEncoder<HttpServletResponse> encoder) {
         rawResponse = response;
-        messageEncoder = encoder;
-    }
-
-    /** {@inheritDoc} */
-    public MessageEncoder<HttpServletResponse> getMessageEncoder() {
-        return messageEncoder;
     }
 
     /** {@inheritDoc} */
     public HttpServletResponse getRawResponse() {
         return rawResponse;
     }
-
-    /**
-     * {@inheritDoc}
-     * 
-     * @throws BindingException thrown if the message can not be encoded and sent to the relying party
-     */
-    public void sendResponse(XMLObject response) throws BindingException {
-        messageEncoder.setResponse(rawResponse);
-        messageEncoder.setSAMLMessage((SAMLObject) response);
-        messageEncoder.encode();
-    }
 }
\ No newline at end of file