[java-identity-provider COMMIT] in /trunk/idp-saml-api/src: main/java/net/shibboleth/idp/saml/profile/SAMLEventIds.ja...
noreply at shibboleth.net
noreply at shibboleth.net
Sun Dec 22 23:49:04 EST 2013
Author: scantor
Date: Sun Dec 22 23:49:04 2013
New Revision: 5079
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=5079&view=rev
Log:
Eliminate redundancy.
Modified:
trunk/idp-saml-api/src/main/java/net/shibboleth/idp/saml/profile/SAMLEventIds.java
trunk/idp-saml-api/src/test/java/net/shibboleth/idp/saml/profile/saml1/SAML1ActionTestingSupport.java
trunk/idp-saml-api/src/test/java/net/shibboleth/idp/saml/profile/saml2/SAML2ActionTestingSupport.java
Modified: trunk/idp-saml-api/src/main/java/net/shibboleth/idp/saml/profile/SAMLEventIds.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-saml-api/src/main/java/net/shibboleth/idp/saml/profile/SAMLEventIds.java?rev=5079&r1=5078&r2=5079&view=diff
==============================================================================
--- trunk/idp-saml-api/src/main/java/net/shibboleth/idp/saml/profile/SAMLEventIds.java (original)
+++ trunk/idp-saml-api/src/main/java/net/shibboleth/idp/saml/profile/SAMLEventIds.java Sun Dec 22 23:49:04 2013
@@ -23,9 +23,6 @@
*/
public final class SAMLEventIds {
- /** Is the SAML message version is incorrect (e.g., received a SAML 1.1 but expected SAML 2 message). */
- public static final String INVALID_MESSAGE_VERSION = "InvalidMessageVersion";
-
/** ID of the event returned if some attributes cannot be encoded. */
public static final String UNABLE_ENCODE_ATTRIBUTE = "UnableToEncodeAttribute";
Modified: trunk/idp-saml-api/src/test/java/net/shibboleth/idp/saml/profile/saml1/SAML1ActionTestingSupport.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-saml-api/src/test/java/net/shibboleth/idp/saml/profile/saml1/SAML1ActionTestingSupport.java?rev=5079&r1=5078&r2=5079&view=diff
==============================================================================
--- trunk/idp-saml-api/src/test/java/net/shibboleth/idp/saml/profile/saml1/SAML1ActionTestingSupport.java (original)
+++ trunk/idp-saml-api/src/test/java/net/shibboleth/idp/saml/profile/saml1/SAML1ActionTestingSupport.java Sun Dec 22 23:49:04 2013
@@ -33,32 +33,13 @@
import net.shibboleth.idp.saml.profile.config.saml1.BrowserSSOProfileConfiguration;
import net.shibboleth.utilities.java.support.primitive.StringSupport;
-import org.joda.time.DateTime;
-import org.opensaml.core.xml.config.XMLObjectProviderRegistrySupport;
import org.opensaml.messaging.context.BaseContext;
-import org.opensaml.saml.common.SAMLObjectBuilder;
-import org.opensaml.saml.common.SAMLVersion;
-import org.opensaml.saml.saml1.core.Assertion;
-import org.opensaml.saml.saml1.core.AttributeQuery;
-import org.opensaml.saml.saml1.core.NameIdentifier;
-import org.opensaml.saml.saml1.core.Request;
-import org.opensaml.saml.saml1.core.Response;
-import org.opensaml.saml.saml1.core.Subject;
/**
* Helper methods for creating/testing SAML 1 objects within profile action tests. When methods herein refer to mock
* objects they are always objects that have been created via Mockito unless otherwise noted.
*/
-public final class SAML1ActionTestingSupport {
-
- /** ID used for all generated {@link Response} objects. */
- public final static String REQUEST_ID = "request";
-
- /** ID used for all generated {@link Response} objects. */
- public final static String RESPONSE_ID = "response";
-
- /** ID used for all generated {@link Assertion} objects. */
- public final static String ASSERTION_ID = "assertion";
+public final class SAML1ActionTestingSupport extends org.opensaml.saml.saml1.profile.SAML1ActionTestingSupport {
/**
* Builds a {@link RelyingPartyContext} that is a child of the given parent context. The build subcontext contains:
@@ -121,97 +102,4 @@
return profileConfigs;
}
- /**
- * Builds an empty response. The ID of the message is {@link SamlActionTestingSupport#OUTBOUND_MSG_ID}, the issues
- * instant is 1970-01-01T00:00:00Z and the SAML version is {@link SAMLVersion#VERSION_11}.
- *
- * @return the constructed response
- */
- public static Response buildResponse() {
- final SAMLObjectBuilder<Response> responseBuilder =
- (SAMLObjectBuilder<Response>) XMLObjectProviderRegistrySupport.getBuilderFactory().getBuilder(
- Response.DEFAULT_ELEMENT_NAME);
-
- final Response response = responseBuilder.buildObject();
- response.setID(ActionTestingSupport.OUTBOUND_MSG_ID);
- response.setIssueInstant(new DateTime(0));
- response.setVersion(SAMLVersion.VERSION_11);
-
- return response;
- }
-
- /**
- * Builds an empty assertion. The ID of the message is {@link #ASSERTION_ID}, the issues instant is
- * 1970-01-01T00:00:00Z and the SAML version is {@link SAMLVersion#VERSION_11}.
- *
- * @return the constructed assertion
- */
- public static Assertion buildAssertion() {
- final SAMLObjectBuilder<Assertion> assertionBuilder =
- (SAMLObjectBuilder<Assertion>) XMLObjectProviderRegistrySupport.getBuilderFactory().getBuilder(
[... 208 lines stripped ...]
More information about the commits
mailing list