Package org.opensaml.saml.saml2.testing
Class SAML2ActionTestingSupport
java.lang.Object
org.opensaml.saml.saml2.testing.SAML2ActionTestingSupport
Helper methods for creating/testing SAML 2 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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ArtifactResolvebuildArtifactResolve(String artifact) Builds aArtifactResolve.static ArtifactResponseBuilds an empty artifact response.static AssertionBuilds an empty assertion.static AttributeQuerybuildAttributeQueryRequest(Subject subject) Builds anAttributeQuery.static AttributeStatementBuilds an empty attribute statement.static AuthnRequestBuilds anAuthnRequest.static AuthnStatementBuilds an authentication statement.static IssuerbuildIssuer(String entityID) Builds aIssuer.static LogoutRequestbuildLogoutRequest(NameID name) Builds anLogoutRequest.static LogoutResponseBuilds an empty logout response.static NameIDbuildNameID(String principalName) Builds aNameID.static ResponseBuilds an empty response.static ScopingbuildScoping(Integer count, Set<String> idplist) Build aScoping.static SubjectbuildSubject(String principalName) Builds aSubject.
-
Field Details
-
Constructor Details
-
SAML2ActionTestingSupport
public SAML2ActionTestingSupport()
-
-
Method Details
-
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
-
buildArtifactResponse
Builds an empty artifact 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
-
buildLogoutRequest
- Parameters:
name- the NameID to add to the request- Returns:
- the built request
-
buildLogoutResponse
Builds an empty logout 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
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
-
buildAuthnStatement
Builds an authentication statement. The authn instant is set to 1970-01-01T00:00:00Z.- Returns:
- the constructed statement
-
buildAttributeStatement
Builds an empty attribute statement.- Returns:
- the constructed statement
-
buildSubject
Builds aSubject. If a principal name is given aNameID, 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
-
buildNameID
Builds aNameID.- Parameters:
principalName- the principal name to use in the NameID- Returns:
- the built NameID
-
buildIssuer
Builds aIssuer.- Parameters:
entityID- the entity ID to use in the Issuer- Returns:
- the built Issuer
-
buildAttributeQueryRequest
Builds anAttributeQuery. If aSubjectis given, it will be added to the constructedAttributeQuery.- Parameters:
subject- the subject to add to the query- Returns:
- the built query
-
buildAuthnRequest
Builds anAuthnRequest.- Returns:
- the built request
-
buildScoping
Build aScoping.- Parameters:
count- proxy countidplist- list of IdP entityIDs- Returns:
- populated
Scoping - Since:
- 4.0.0
-
buildArtifactResolve
Builds aArtifactResolve.- Parameters:
artifact- the artifact to add to the request- Returns:
- the built request
-