<bean id="shibboleth.SAML2ProtocolMessageRuleFactory" class="org.opensaml.saml2.binding.security.SAML2ProtocolMessageRuleFactory" />
- <bean id="shibboleth.SAML1ProtocolMessageRuleFactory" class="org.opensaml.saml1.binding.security.SAML1ProtocolMessageRuleFactory" />
+ <bean id="shibboleth.SAML1ProtocolMessageRuleFactory" class="edu.internet2.middleware.shibboleth.common.binding.security.ShibbolethSAML1ProtocolMessageRuleFactory" />
<bean id="shibboleth.MessageIssueInstantRuleFactory" class="org.opensaml.common.binding.security.IssueInstantRuleFactory">
<property name="clockSkew" value="5" />
import org.opensaml.saml1.core.Conditions;
import org.opensaml.saml1.core.ConfirmationMethod;
import org.opensaml.saml1.core.NameIdentifier;
+import org.opensaml.saml1.core.Request;
import org.opensaml.saml1.core.RequestAbstractType;
import org.opensaml.saml1.core.Response;
import org.opensaml.saml1.core.ResponseAbstractType;
ShibbolethSAMLAttributeRequestContext<NameIdentifier, AttributeQuery> queryContext;
- if (requestContext.getSamlRequest() instanceof AttributeQuery) {
+ if (requestContext.getSamlRequest() instanceof Request) {
+ Request samlRequest = (Request) requestContext.getSamlRequest();
queryContext = new ShibbolethSAMLAttributeRequestContext<NameIdentifier, AttributeQuery>(
getMetadataProvider(), requestContext.getRelyingPartyConfiguration(),
- (AttributeQuery) requestContext.getSamlRequest());
+ samlRequest.getAttributeQuery());
} else {
queryContext = new ShibbolethSAMLAttributeRequestContext<NameIdentifier, AttributeQuery>(
- getMetadataProvider(), requestContext.getRelyingPartyConfiguration());
+ getMetadataProvider(), requestContext.getRelyingPartyConfiguration(), null);
}
queryContext.setAttributeRequester(requestContext.getAssertingPartyId());
* @param <ResponseType> type of SAML 1 response
* @param <ProfileConfigurationType> configuration type for this profile
*/
- protected class SAML1ProfileRequestContext<RequestType extends SAMLObject, ResponseType extends ResponseAbstractType, ProfileConfigurationType extends AbstractSAML1ProfileConfiguration>
+ protected class SAML1ProfileRequestContext<RequestType extends RequestAbstractType, ResponseType extends ResponseAbstractType, ProfileConfigurationType extends AbstractSAML1ProfileConfiguration>
extends SAMLProfileRequestContext {
/** SAML request message. */
import org.opensaml.saml1.binding.decoding.HTTPSOAP11Decoder;
import org.opensaml.saml1.binding.encoding.HTTPSOAP11Encoder;
import org.opensaml.saml1.core.AttributeQuery;
+import org.opensaml.saml1.core.Request;
import org.opensaml.saml1.core.Response;
import org.opensaml.saml1.core.Statement;
import org.opensaml.saml1.core.StatusCode;
SAMLSecurityPolicy securityPolicy = requestContext.getMessageDecoder().getSecurityPolicy();
requestContext.setRelyingPartyId(securityPolicy.getIssuer());
- AttributeQuery attributeQuery = (AttributeQuery) requestContext.getMessageDecoder().getSAMLMessage();
- requestContext.setSamlRequest(attributeQuery);
+ Request request = (Request) requestContext.getMessageDecoder().getSAMLMessage();
+ requestContext.setSamlRequest(request);
+ requestContext.setAttributeQuery(request.getAttributeQuery());
populateRelyingPartyData(requestContext);
/** Basic data structure used to accumulate information as a request is being processed. */
protected class AttributeQueryContext extends
- SAML1ProfileRequestContext<AttributeQuery, Response, AttributeQueryConfiguration> {
+ SAML1ProfileRequestContext<Request, Response, AttributeQueryConfiguration> {
+
+ private AttributeQuery attributeQuery;
/**
* Constructor.
public AttributeQueryContext(ProfileRequest<ServletRequest> request, ProfileResponse<ServletResponse> response) {
super(request, response);
}
+
+ public AttributeQuery getAttributeQuery(){
+ return attributeQuery;
+ }
+
+ public void setAttributeQuery(AttributeQuery query){
+ attributeQuery = query;
+ }
}
}
\ No newline at end of file
import javax.servlet.http.HttpSession;
import org.apache.log4j.Logger;
-import org.opensaml.common.SAMLObject;
import org.opensaml.common.SAMLObjectBuilder;
import org.opensaml.common.binding.BasicEndpointSelector;
import org.opensaml.common.binding.BindingException;
import org.opensaml.common.binding.encoding.MessageEncoder;
import org.opensaml.saml1.core.AuthenticationStatement;
+import org.opensaml.saml1.core.Request;
import org.opensaml.saml1.core.Response;
import org.opensaml.saml1.core.Statement;
import org.opensaml.saml1.core.StatusCode;
/** Represents the internal state of a Shibboleth SSO Request while it's being processed by the IdP. */
protected class ShibbolethSSORequestContext extends
- SAML1ProfileRequestContext<SAMLObject, Response, ShibbolethSSOConfiguration> {
+ SAML1ProfileRequestContext<Request, Response, ShibbolethSSOConfiguration> {
/** Current login context. */
private ShibbolethSSOLoginContext loginContext;
SAML2ProfileRequestContext requestContext) {
ShibbolethSAMLAttributeRequestContext<NameID, AttributeQuery> queryContext;
- if (requestContext.getSamlRequest() instanceof AttributeQuery) {
- queryContext = new ShibbolethSAMLAttributeRequestContext<NameID, AttributeQuery>(getMetadataProvider(),
- requestContext.getRelyingPartyConfiguration(), (AttributeQuery) requestContext.getSamlRequest());
- } else {
- queryContext = new ShibbolethSAMLAttributeRequestContext<NameID, AttributeQuery>(getMetadataProvider(),
- requestContext.getRelyingPartyConfiguration());
- }
-
+
+ queryContext = new ShibbolethSAMLAttributeRequestContext<NameID, AttributeQuery>(getMetadataProvider(),
+ requestContext.getRelyingPartyConfiguration(), (AttributeQuery) requestContext.getSamlRequest());
queryContext.setAttributeRequester(requestContext.getAssertingPartyId());
queryContext.setPrincipalName(requestContext.getPrincipalName());
queryContext.setProfileConfiguration(requestContext.getProfileConfiguration());