[java-identity-provider COMMIT] in /trunk/idp-saml-impl/src: main/java/net/shibboleth/idp/saml/impl/profile/saml1/Add...
noreply at shibboleth.net
noreply at shibboleth.net
Wed Oct 17 15:42:04 EDT 2012
Author: tzeller
Date: Wed Oct 17 15:42:03 2012
New Revision: 4222
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=4222&view=rev
Log:
Completed check for null TODO. Fixed typo so saml2 class returns saml2 version. Updated tests.
Modified:
trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/saml1/AddResponseShell.java
trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/saml2/AddResponseShell.java
trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/impl/profile/saml2/AddResponseShellTest.java
Modified: trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/saml1/AddResponseShell.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/saml1/AddResponseShell.java?rev=4222&r1=4221&r2=4222&view=diff
==============================================================================
--- trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/saml1/AddResponseShell.java (original)
+++ trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/saml1/AddResponseShell.java Wed Oct 17 15:42:03 2012
@@ -28,6 +28,7 @@
import net.shibboleth.idp.profile.EventIds;
import net.shibboleth.idp.profile.ProfileException;
import net.shibboleth.idp.profile.ProfileRequestContext;
+import net.shibboleth.idp.profile.config.ProfileConfiguration;
import net.shibboleth.idp.relyingparty.RelyingPartyContext;
import net.shibboleth.idp.saml.profile.SamlEventIds;
import net.shibboleth.utilities.java.support.component.ComponentSupport;
@@ -136,9 +137,13 @@
status.setStatusCode(statusCode);
final Response response = responseBuilder.buildObject();
- // TODO check for nulls
- response.setID(relyingPartyCtx.getProfileConfig().getSecurityConfiguration().getIdGenerator()
- .generateIdentifier());
+ ProfileConfiguration profileConfiguration = relyingPartyCtx.getProfileConfig();
+ if (profileConfiguration == null) {
+ log.error("Action {}: No profile configuration located in current relying party context", getId());
+ return ActionSupport.buildEvent(this, EventIds.INVALID_RELYING_PARTY_CTX);
+ }
+
+ response.setID(profileConfiguration.getSecurityConfiguration().getIdGenerator().generateIdentifier());
response.setIssueInstant(new DateTime(ISOChronology.getInstanceUTC()));
response.setStatus(status);
response.setVersion(SAMLVersion.VERSION_11);
Modified: trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/saml2/AddResponseShell.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/saml2/AddResponseShell.java?rev=4222&r1=4221&r2=4222&view=diff
==============================================================================
--- trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/saml2/AddResponseShell.java (original)
+++ trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/saml2/AddResponseShell.java Wed Oct 17 15:42:03 2012
@@ -28,6 +28,7 @@
import net.shibboleth.idp.profile.EventIds;
import net.shibboleth.idp.profile.ProfileException;
import net.shibboleth.idp.profile.ProfileRequestContext;
+import net.shibboleth.idp.profile.config.ProfileConfiguration;
import net.shibboleth.idp.relyingparty.RelyingPartyContext;
import net.shibboleth.idp.saml.profile.SamlEventIds;
import net.shibboleth.utilities.java.support.component.ComponentSupport;
@@ -136,12 +137,16 @@
status.setStatusCode(statusCode);
final Response response = responseBuilder.buildObject();
- // TODO check for nulls
- response.setID(relyingPartyCtx.getProfileConfig().getSecurityConfiguration().getIdGenerator()
- .generateIdentifier());
+ ProfileConfiguration profileConfiguration = relyingPartyCtx.getProfileConfig();
+ if (profileConfiguration == null) {
+ log.error("Action {}: No profile configuration located in current relying party context", getId());
+ return ActionSupport.buildEvent(this, EventIds.INVALID_RELYING_PARTY_CTX);
+ }
+
+ response.setID(profileConfiguration.getSecurityConfiguration().getIdGenerator().generateIdentifier());
response.setIssueInstant(new DateTime(ISOChronology.getInstanceUTC()));
response.setStatus(status);
- response.setVersion(SAMLVersion.VERSION_11);
+ response.setVersion(SAMLVersion.VERSION_20);
outboundMessageCtx.setMessage(response);
Modified: trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/impl/profile/saml2/AddResponseShellTest.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/impl/profile/saml2/AddResponseShellTest.java?rev=4222&r1=4221&r2=4222&view=diff
==============================================================================
[... 37 lines stripped ...]
More information about the commits
mailing list