mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-07-04 09:42:29 +00:00
Update SAML2 errors in integration tests
This commit is contained in:
parent
69b1bc62ff
commit
3ed31400f7
@ -77,7 +77,6 @@ import javax.servlet.http.HttpSession;
|
|||||||
|
|
||||||
import static java.nio.charset.StandardCharsets.UTF_8;
|
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||||
import static org.hamcrest.Matchers.containsString;
|
import static org.hamcrest.Matchers.containsString;
|
||||||
import static org.hamcrest.Matchers.equalTo;
|
|
||||||
import static org.hamcrest.Matchers.startsWith;
|
import static org.hamcrest.Matchers.startsWith;
|
||||||
import static org.springframework.security.samples.OpenSamlActionTestingSupport.buildConditions;
|
import static org.springframework.security.samples.OpenSamlActionTestingSupport.buildConditions;
|
||||||
import static org.springframework.security.samples.OpenSamlActionTestingSupport.buildIssuer;
|
import static org.springframework.security.samples.OpenSamlActionTestingSupport.buildIssuer;
|
||||||
@ -237,8 +236,8 @@ public class Saml2LoginIntegrationTests {
|
|||||||
sendResponse(response, "/login?error")
|
sendResponse(response, "/login?error")
|
||||||
.andExpect(
|
.andExpect(
|
||||||
saml2AuthenticationExceptionMatcher(
|
saml2AuthenticationExceptionMatcher(
|
||||||
"invalid_signature",
|
"invalid_assertion",
|
||||||
equalTo("Assertion doesn't have a valid signature.")
|
containsString("Invalid assertion [assertion] for SAML response")
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -253,7 +252,7 @@ public class Saml2LoginIntegrationTests {
|
|||||||
.andExpect(
|
.andExpect(
|
||||||
saml2AuthenticationExceptionMatcher(
|
saml2AuthenticationExceptionMatcher(
|
||||||
"invalid_assertion",
|
"invalid_assertion",
|
||||||
containsString("Assertion 'assertion' with NotOnOrAfter condition of")
|
containsString("Invalid assertion [assertion] for SAML response")
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -268,7 +267,7 @@ public class Saml2LoginIntegrationTests {
|
|||||||
.andExpect(
|
.andExpect(
|
||||||
saml2AuthenticationExceptionMatcher(
|
saml2AuthenticationExceptionMatcher(
|
||||||
"invalid_assertion",
|
"invalid_assertion",
|
||||||
containsString("Assertion 'assertion' with NotBefore condition of")
|
containsString("Invalid assertion [assertion] for SAML response")
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -285,8 +284,7 @@ public class Saml2LoginIntegrationTests {
|
|||||||
saml2AuthenticationExceptionMatcher(
|
saml2AuthenticationExceptionMatcher(
|
||||||
"invalid_issuer",
|
"invalid_issuer",
|
||||||
containsString(
|
containsString(
|
||||||
"Response issuer 'invalid issuer' doesn't match "+
|
"Invalid issuer [invalid issuer] for SAML response"
|
||||||
"'https://simplesaml-for-spring-saml.cfapps.io/saml2/idp/metadata.php'"
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user