Polish OpenSamlAuthenticationProviderTests

- Add missing assertion

Issue gh-6019
This commit is contained in:
Josh Cummings 2020-04-17 09:16:16 -06:00
parent 7b34b223e6
commit 067cb4579e
No known key found for this signature in database
GPG Key ID: 49EF60DD7FF83443
1 changed files with 7 additions and 0 deletions

View File

@ -116,6 +116,13 @@ public class OpenSamlAuthenticationProviderTests {
@Test
public void authenticateWhenInvalidDestinationThenThrowAuthenticationException() {
Response response = response(recipientUri + "invalid", idpEntityId);
Assertion assertion = defaultAssertion();
signXmlObject(
assertion,
assertingPartyCredentials(),
recipientEntityId
);
response.getAssertions().add(assertion);
token = responseXml(response, idpEntityId);
exception.expect(authenticationMatcher(Saml2ErrorCodes.INVALID_DESTINATION));
provider.authenticate(token);