mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-06-01 09:42:13 +00:00
Correct Test
Issue gh-10220
This commit is contained in:
parent
5cda362c47
commit
c6e5781679
@ -277,12 +277,10 @@ public class OpenSaml4AuthenticationProviderTests {
|
|||||||
EncryptedAssertion encryptedAssertion = TestOpenSamlObjects.encrypted(assertion(),
|
EncryptedAssertion encryptedAssertion = TestOpenSamlObjects.encrypted(assertion(),
|
||||||
TestSaml2X509Credentials.assertingPartyEncryptingCredential());
|
TestSaml2X509Credentials.assertingPartyEncryptingCredential());
|
||||||
response.getEncryptedAssertions().add(encryptedAssertion);
|
response.getEncryptedAssertions().add(encryptedAssertion);
|
||||||
TestOpenSamlObjects.signed(response, TestSaml2X509Credentials.assertingPartySigningCredential(),
|
Saml2AuthenticationToken token = token(response, decrypting(verifying(registration())));
|
||||||
RELYING_PARTY_ENTITY_ID);
|
|
||||||
Saml2AuthenticationToken token = token(response, decrypting(registration()));
|
|
||||||
assertThatExceptionOfType(Saml2AuthenticationException.class)
|
assertThatExceptionOfType(Saml2AuthenticationException.class)
|
||||||
.isThrownBy(() -> this.provider.authenticate(token))
|
.isThrownBy(() -> this.provider.authenticate(token))
|
||||||
.satisfies(errorOf(Saml2ErrorCodes.INVALID_SIGNATURE));
|
.satisfies(errorOf(Saml2ErrorCodes.MALFORMED_RESPONSE_DATA));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Loading…
x
Reference in New Issue
Block a user