Package org.opensaml.saml.saml1.profile
Class SAML1ActionTestingSupport
- java.lang.Object
-
- org.opensaml.saml.saml1.profile.SAML1ActionTestingSupport
-
public class SAML1ActionTestingSupport extends Object
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.
-
-
Field Summary
Fields Modifier and Type Field Description static StringASSERTION_IDID used for all generatedAssertionobjects.static StringREQUEST_IDID used for all generatedResponseobjects.static StringRESPONSE_IDID used for all generatedResponseobjects.
-
Constructor Summary
Constructors Constructor Description SAML1ActionTestingSupport()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.opensaml.saml.saml1.core.RequestbuildArtifactRequest(String... artifacts)Builds aRequestcontainingAssertionArtifacts.static org.opensaml.saml.saml1.core.AssertionbuildAssertion()Builds an empty assertion.static org.opensaml.saml.saml1.core.RequestbuildAttributeQueryRequest(org.opensaml.saml.saml1.core.Subject subject)Builds aRequestcontaining anAttributeQuery.static org.opensaml.saml.saml1.core.AttributeStatementbuildAttributeStatement()Builds an empty attribute statement.static org.opensaml.saml.saml1.core.AuthenticationStatementbuildAuthenticationStatement()Builds an authentication statement.static org.opensaml.saml.saml1.core.ResponsebuildResponse()Builds an empty response.static org.opensaml.saml.saml1.core.SubjectbuildSubject(String principalName)Builds aSubject.
-
-
-
Field Detail
-
REQUEST_ID
public static final String REQUEST_ID
ID used for all generatedResponseobjects.- See Also:
- Constant Field Values
-
RESPONSE_ID
public static final String RESPONSE_ID
ID used for all generatedResponseobjects.- See Also:
- Constant Field Values
-
ASSERTION_ID
public static final String ASSERTION_ID
ID used for all generatedAssertionobjects.- See Also:
- Constant Field Values
-
-
Method Detail
-
buildResponse
@Nonnull public static org.opensaml.saml.saml1.core.Response buildResponse()
Builds an empty response. The ID of the message isActionTestingSupport.OUTBOUND_MSG_ID, the issue instant is 1970-01-01T00:00:00Z and the SAML version isSAMLVersion.VERSION_11.- Returns:
- the constructed response
-
buildAssertion
@Nonnull public static org.opensaml.saml.saml1.core.Assertion buildAssertion()
Builds an empty assertion. The ID of the message isASSERTION_ID, the issue instant is 1970-01-01T00:00:00Z and the SAML version isSAMLVersion.VERSION_11.- Returns:
- the constructed assertion
-
buildAuthenticationStatement
@Nonnull public static org.opensaml.saml.saml1.core.AuthenticationStatement buildAuthenticationStatement()
Builds an authentication statement. The authn instant is set to 1970-01-01T00:00:00Z and the method is set to password.- Returns:
- the constructed statement
-
buildAttributeStatement
@Nonnull public static org.opensaml.saml.saml1.core.AttributeStatement buildAttributeStatement()
Builds an empty attribute statement.- Returns:
- the constructed statement
-
buildSubject
@Nonnull public static org.opensaml.saml.saml1.core.Subject buildSubject(@Nullable String principalName)Builds aSubject. If a principal name is given aNameIdentifier, whose value is the given principal name, will be created and added to theSubject.- Parameters:
principalName- the principal name to add to the subject- Returns:
- the built subject
-
buildAttributeQueryRequest
@Nonnull public static org.opensaml.saml.saml1.core.Request buildAttributeQueryRequest(@Nullable org.opensaml.saml.saml1.core.Subject subject)Builds aRequestcontaining anAttributeQuery. If aSubjectis given, it will be added to the constructedAttributeQuery.- Parameters:
subject- the subject to add to the query- Returns:
- the built query
-
buildArtifactRequest
@Nonnull public static org.opensaml.saml.saml1.core.Request buildArtifactRequest(@Nullable String... artifacts)Builds aRequestcontainingAssertionArtifacts.- Parameters:
artifacts- the artifacts to add to the request- Returns:
- the built request
-
-