Skip to content

Commit af433fd

Browse files
committed
Polish OpenSamlAuthenticationProviderTests
- Add missing assertion Issue gh-6019
1 parent 2289ad5 commit af433fd

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

saml2/saml2-service-provider/src/test/java/org/springframework/security/saml2/provider/service/authentication/OpenSamlAuthenticationProviderTests.java

+7
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,13 @@ public void authenticateWhenXmlErrorThenThrowAuthenticationException() {
116116
@Test
117117
public void authenticateWhenInvalidDestinationThenThrowAuthenticationException() {
118118
Response response = response(recipientUri + "invalid", idpEntityId);
119+
Assertion assertion = defaultAssertion();
120+
signXmlObject(
121+
assertion,
122+
assertingPartyCredentials(),
123+
recipientEntityId
124+
);
125+
response.getAssertions().add(assertion);
119126
token = responseXml(response);
120127
exception.expect(authenticationMatcher(Saml2ErrorCodes.INVALID_DESTINATION));
121128
provider.authenticate(token);

0 commit comments

Comments
 (0)