public class SAML1TestResponseValidator extends Object
| Modifier and Type | Field and Description |
|---|---|
String |
authenticationMethod
Expected authentication method.
|
String |
confirmationMethod
Expected confirmation method.
|
String |
idpEntityID
Expected IdP entity ID.
|
org.opensaml.saml.saml1.core.NameIdentifier |
nameIdentifier
Expected name identifier.
|
String |
spEntityID
Expected SP entity ID.
|
QName |
statusCode
Expected status code.
|
String |
statusMessage
Expected status message when an error occurs.
|
boolean |
usedAttributeDesignators
Whether attributes were limited by designators.
|
boolean |
validateAuthenticationStatements
Whether authentication statements should be validated.
|
| Constructor and Description |
|---|
SAML1TestResponseValidator()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
assertAssertion(org.opensaml.saml.saml1.core.Assertion assertion)
Assert that :
the assertion ID is not null nor empty
the assertion issue instant is not null
the assertion version is
SAMLVersion.VERSION_11
the assertion issuer is the expected IdP entity ID
|
void |
assertAssertions(List<org.opensaml.saml.saml1.core.Assertion> assertions)
Assert that a single assertion is present.
|
void |
assertAttribute(org.opensaml.saml.saml1.core.Attribute attribute,
String attributeName,
String attributeValue)
Assert that the attribute namespace is
SAMLConstants.SAML1_ATTR_NAMESPACE_URI, the attribute name is the
supplied name, and the attribute value is the single supplied String value. |
void |
assertAttributes(List<org.opensaml.saml.saml1.core.Attribute> attributes)
Assert that two attributes are present.
|
void |
assertAttributeStatement(org.opensaml.saml.saml1.core.AttributeStatement attributeStatement)
Assert that the attribute statement has a subject and attributes.
|
void |
assertAttributeStatements(List<org.opensaml.saml.saml1.core.AttributeStatement> attributeStatements)
Assert that a single attribute statement is present.
|
void |
assertAudienceRestrictionConditions(List<org.opensaml.saml.saml1.core.AudienceRestrictionCondition> audienceRestrictionConditions)
Assert that a single audience restriction condition is present.
|
void |
assertAudiences(List<org.opensaml.saml.saml1.core.Audience> audiences)
Assert that a single audience is present whose URI is the expected SP entity ID.
|
void |
assertAuthenticationMethod(String method)
Assert that the authentication method is the expected authentication method.
|
void |
assertAuthenticationStatement(org.opensaml.saml.saml1.core.AuthenticationStatement authenticationStatement)
Assert that :
the authentication statement has a subject
the authentication instant is not null
the authentication method is not null nor empty
|
void |
assertAuthenticationStatements(List<org.opensaml.saml.saml1.core.AuthenticationStatement> authenticationStatements)
Assert that a single authentication statement is present.
|
void |
assertConditions(org.opensaml.saml.saml1.core.Conditions conditions)
Assert that the conditions has a NotBefore and NotOnOrAfter attribute, and that a single audience restriction
conditions is present.
|
void |
assertConfirmationMethod(org.opensaml.saml.saml1.core.ConfirmationMethod method)
Assert the confirmation method.
|
void |
assertConfirmationMethods(List<org.opensaml.saml.saml1.core.ConfirmationMethod> confirmationMethods)
Assert that a single confirmation method is present.
|
void |
assertNameIdentifier(org.opensaml.saml.saml1.core.NameIdentifier identifier)
Assert that :
the name identifier is not null
the name identifier value is not null
the name identifier value is the expected value if the format is not transient
the name format is the expected name format/li>
the name qualifier is the expected name qualifier
|
void |
assertResponse(org.opensaml.saml.saml1.core.Response response)
Assert that :
the response ID is not null nor empty
the response IssueInstant is not null
the response version is
SAMLVersion.VERSION_11
|
void |
assertStatus(org.opensaml.saml.saml1.core.Status status)
Assert that :
the status is not null
the status code is not null
the status code is the expected status code
the status message is the expected status message if the status code is not success
|
void |
assertSubject(org.opensaml.saml.saml1.core.Subject subject)
Assert that the subject has a name identifier and subject confirmation.
|
void |
assertSubjectConfirmation(org.opensaml.saml.saml1.core.SubjectConfirmation subjectConfirmation)
Assert that the subject confirmation has a single confirmation method.
|
void |
validateAttributeStatements(org.opensaml.saml.saml1.core.Assertion assertion)
Validate the assertion attribute statements.
|
void |
validateAuthenticationStatements(org.opensaml.saml.saml1.core.Assertion assertion)
Validate the assertion authentication statements.
|
void |
validateConditions(org.opensaml.saml.saml1.core.Assertion assertion)
Validate the assertion conditions.
|
void |
validateResponse(org.opensaml.saml.saml1.core.Response response)
Validate the response.
|
@Nonnull public org.opensaml.saml.saml1.core.NameIdentifier nameIdentifier
public boolean validateAuthenticationStatements
public boolean usedAttributeDesignators
public void validateResponse(@Nullable org.opensaml.saml.saml1.core.Response response)
response - the SAML responsepublic void validateConditions(@Nullable org.opensaml.saml.saml1.core.Assertion assertion)
Calls assert methods :
assertion - the assertionpublic void validateAuthenticationStatements(@Nullable org.opensaml.saml.saml1.core.Assertion assertion)
Calls assert methods :
assertion - the assertionpublic void validateAttributeStatements(@Nullable org.opensaml.saml.saml1.core.Assertion assertion)
Calls assert methods :
assertion - the assertionpublic void assertResponse(@Nullable org.opensaml.saml.saml1.core.Response response)
SAMLVersion.VERSION_11response - the SAML 1 responsepublic void assertStatus(@Nullable org.opensaml.saml.saml1.core.Status status)
status - the statuspublic void assertAssertions(@Nullable List<org.opensaml.saml.saml1.core.Assertion> assertions)
assertions - the assertionspublic void assertAssertion(@Nullable org.opensaml.saml.saml1.core.Assertion assertion)
SAMLVersion.VERSION_11assertion - the assertionpublic void assertAuthenticationStatements(@Nullable List<org.opensaml.saml.saml1.core.AuthenticationStatement> authenticationStatements)
authenticationStatements - the authentication statementspublic void assertAuthenticationStatement(@Nullable org.opensaml.saml.saml1.core.AuthenticationStatement authenticationStatement)
authenticationStatement - the authentication statementpublic void assertAuthenticationMethod(@Nullable String method)
method - the authentication methodpublic void assertAudienceRestrictionConditions(@Nullable List<org.opensaml.saml.saml1.core.AudienceRestrictionCondition> audienceRestrictionConditions)
audienceRestrictionConditions - the audience restriction conditionspublic void assertAudiences(@Nullable List<org.opensaml.saml.saml1.core.Audience> audiences)
audiences - the audiencespublic void assertConditions(@Nullable org.opensaml.saml.saml1.core.Conditions conditions)
conditions - the conditionspublic void assertAttributeStatements(@Nullable List<org.opensaml.saml.saml1.core.AttributeStatement> attributeStatements)
attributeStatements - the attribute statementspublic void assertAttributeStatement(@Nullable org.opensaml.saml.saml1.core.AttributeStatement attributeStatement)
attributeStatement - the attribute statementpublic void assertSubject(@Nullable org.opensaml.saml.saml1.core.Subject subject)
subject - the subjectpublic void assertNameIdentifier(@Nullable org.opensaml.saml.saml1.core.NameIdentifier identifier)
identifier - the name identifierpublic void assertSubjectConfirmation(@Nullable org.opensaml.saml.saml1.core.SubjectConfirmation subjectConfirmation)
subjectConfirmation - the subject confirmationpublic void assertConfirmationMethods(@Nullable List<org.opensaml.saml.saml1.core.ConfirmationMethod> confirmationMethods)
assertConfirmationMethod(ConfirmationMethod).confirmationMethods - the confirmation methodspublic void assertConfirmationMethod(@Nullable org.opensaml.saml.saml1.core.ConfirmationMethod method)
method - the confirmation methodpublic void assertAttributes(@Nullable List<org.opensaml.saml.saml1.core.Attribute> attributes)
The first attribute is
SAMLConstants.SAML1_ATTR_NAMESPACE_URIThe second attribute is
SAMLConstants.SAML1_ATTR_NAMESPACE_URIattributes - the attributespublic void assertAttribute(@Nullable org.opensaml.saml.saml1.core.Attribute attribute, @Nonnull String attributeName, @Nonnull String attributeValue)
SAMLConstants.SAML1_ATTR_NAMESPACE_URI, the attribute name is the
supplied name, and the attribute value is the single supplied String value.attribute - the attributeattributeName - the attribute nameattributeValue - the attribute valueCopyright © 1999–2015. All rights reserved.