[java-identity-provider COMMIT] in /trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile: BaseIdpIn...

noreply at shibboleth.net noreply at shibboleth.net
Thu Jul 19 09:08:50 EDT 2012


Author: lajoie
Date: Thu Jul 19 09:08:50 2012
New Revision: 4210

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=4210&view=rev
Log:
profile stages and message decoders for SAML 1 and 2 IdP-initiated SSO requests - still need to deal with relay state and testing

Added:
    trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/BaseIdpInitiatedSsoRequestMessageDecoder.java
      - copied, changed from r4203, trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/IdpInitiatedSsoRequestMessageDecoder.java
    trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/saml1/IdpInitiatedSsoDecoderFactory.java   (with props)
    trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/saml2/IdPInitiatedSsoDecoderFactory.java   (with props)
Modified:
    trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/IdpInitatedSsoRequest.java
    trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/IdpInitiatedSsoRequestMessageDecoder.java
    trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/IdpInitiatedSsoRequestMessageDecoderFactory.java

Copied: trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/BaseIdpInitiatedSsoRequestMessageDecoder.java (from r4203, trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/IdpInitiatedSsoRequestMessageDecoder.java)
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/BaseIdpInitiatedSsoRequestMessageDecoder.java?p2=trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/BaseIdpInitiatedSsoRequestMessageDecoder.java&p1=trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/IdpInitiatedSsoRequestMessageDecoder.java&r1=4203&r2=4210&rev=4210&view=diff
==============================================================================
--- trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/IdpInitiatedSsoRequestMessageDecoder.java (original)
+++ trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/BaseIdpInitiatedSsoRequestMessageDecoder.java Thu Jul 19 09:08:50 2012
@@ -22,15 +22,17 @@
 
 import net.shibboleth.utilities.java.support.primitive.StringSupport;
 
-import org.opensaml.messaging.context.BasicMessageMetadataContext;
-import org.opensaml.messaging.context.MessageContext;
 import org.opensaml.messaging.decoder.MessageDecodingException;
 import org.opensaml.messaging.decoder.servlet.AbstractHttpServletRequestMessageDecoder;
 
-/** Decodes an incoming Shibboleth Authentication Request message. */
+/**
+ * Decodes an incoming Shibboleth Authentication Request message.
+ * 
+ * @param <RequestType> type of decoded message
+ */
 @NotThreadSafe
-public class IdpInitiatedSsoRequestMessageDecoder extends
-        AbstractHttpServletRequestMessageDecoder<IdpInitatedSsoRequest> {
+public abstract class BaseIdpInitiatedSsoRequestMessageDecoder<RequestType> extends
+        AbstractHttpServletRequestMessageDecoder<RequestType> {
 
     /**
      * Deprecated name of the query parameter carrying the service provider entity ID: {@value} . Use of
@@ -59,26 +61,6 @@
     /** Name of the query parameter carrying the current time at the service provider: {@value. } */
     public static final String TIME_PARAM = "time";
 
-    /** {@inheritDoc} */
-    protected void doDecode() throws MessageDecodingException {
-        IdpInitatedSsoRequest authnRequest =
-                new IdpInitatedSsoRequest(getEntityId(getHttpServletRequest()), getAcsUrl(getHttpServletRequest()),
-                        getTarget(getHttpServletRequest()), getTime(getHttpServletRequest()));
-
-        MessageContext<IdpInitatedSsoRequest> messageContext = new MessageContext<IdpInitatedSsoRequest>();
-        messageContext.setMessage(authnRequest);
-
-        BasicMessageMetadataContext msgMetadata = new BasicMessageMetadataContext();
-        // TODO need to generate a message ID, probably need to base it off of the conversation ID
-        // msgMetadata.setMessageId(messageId);
-        msgMetadata.setMessageIssueInstant(authnRequest.getTime());
-        msgMetadata.setMessageIssuer(authnRequest.getEntityId());
-
-        messageContext.addSubcontext(msgMetadata);
-
-        setMessageContext(messageContext);
-    }
-
     /**
      * Gets the entity ID of the service provider.
      * 
@@ -88,7 +70,7 @@
      * 
      * @throws MessageDecodingException thrown if the request does not contain a service provider entity ID
      */
-    private String getEntityId(HttpServletRequest request) throws MessageDecodingException {
+    public String getEntityId(HttpServletRequest request) throws MessageDecodingException {
         String entityId = StringSupport.trimOrNull(request.getParameter(ENTITY_ID_PARAM));
         if (entityId == null) {
             entityId = StringSupport.trimOrNull(request.getParameter(PROVIDER_ID_PARAM));
@@ -108,7 +90,7 @@
      * 

[... 26 lines stripped ...]


More information about the commits mailing list