|
@@ -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);
|
|
token = responseXml(response);
|
|
exception.expect(authenticationMatcher(Saml2ErrorCodes.INVALID_DESTINATION));
|
|
exception.expect(authenticationMatcher(Saml2ErrorCodes.INVALID_DESTINATION));
|
|
provider.authenticate(token);
|
|
provider.authenticate(token);
|