Polish OpenSamlAuthenticationProviderTests
- Add missing assertion Issue gh-6019
This commit is contained in:
parent
7b34b223e6
commit
067cb4579e
|
@ -116,6 +116,13 @@ public class OpenSamlAuthenticationProviderTests {
|
||||||
@Test
|
@Test
|
||||||
public void authenticateWhenInvalidDestinationThenThrowAuthenticationException() {
|
public void authenticateWhenInvalidDestinationThenThrowAuthenticationException() {
|
||||||
Response response = response(recipientUri + "invalid", idpEntityId);
|
Response response = response(recipientUri + "invalid", idpEntityId);
|
||||||
|
Assertion assertion = defaultAssertion();
|
||||||
|
signXmlObject(
|
||||||
|
assertion,
|
||||||
|
assertingPartyCredentials(),
|
||||||
|
recipientEntityId
|
||||||
|
);
|
||||||
|
response.getAssertions().add(assertion);
|
||||||
token = responseXml(response, idpEntityId);
|
token = responseXml(response, idpEntityId);
|
||||||
exception.expect(authenticationMatcher(Saml2ErrorCodes.INVALID_DESTINATION));
|
exception.expect(authenticationMatcher(Saml2ErrorCodes.INVALID_DESTINATION));
|
||||||
provider.authenticate(token);
|
provider.authenticate(token);
|
||||||
|
|
Loading…
Reference in New Issue