Fix SAML2 samples
This commit is contained in:
@@ -50,7 +50,7 @@ You will be redirect to the Okta SAML 2.0 IDP
|
||||
=== Type in your credentials
|
||||
|
||||
```
|
||||
User: testuser@spring.security.saml
|
||||
User: testuser2@spring.security.saml
|
||||
Password: 12345678
|
||||
```
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ dependencies {
|
||||
implementation 'org.springframework.security:spring-security-saml2-service-provider'
|
||||
implementation 'org.thymeleaf.extras:thymeleaf-extras-springsecurity5'
|
||||
|
||||
testImplementation 'net.sourceforge.htmlunit:htmlunit:2.44.0'
|
||||
testImplementation 'net.sourceforge.htmlunit:htmlunit'
|
||||
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
||||
testImplementation 'org.springframework.security:spring-security-test'
|
||||
}
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
version=5.8.0-SNAPSHOT
|
||||
spring-security.version=5.8.0-SNAPSHOT
|
||||
htmlunit.version=2.70.0
|
||||
|
||||
@@ -52,7 +52,7 @@ public class Saml2LoginApplicationITests {
|
||||
void authenticationAttemptWhenValidThenShowsUserEmailAddress() throws Exception {
|
||||
performLogin();
|
||||
HtmlPage home = (HtmlPage) this.webClient.getCurrentWindow().getEnclosedPage();
|
||||
assertThat(home.asText()).contains("You're email address is testuser@spring.security.saml");
|
||||
assertThat(home.asNormalizedText()).contains("You're email address is testuser2@spring.security.saml");
|
||||
}
|
||||
|
||||
private void performLogin() throws Exception {
|
||||
@@ -62,7 +62,7 @@ public class Saml2LoginApplicationITests {
|
||||
HtmlInput username = form.getInputByName("username");
|
||||
HtmlPasswordInput password = form.getInputByName("password");
|
||||
HtmlSubmitInput submit = login.getHtmlElementById("okta-signin-submit");
|
||||
username.type("testuser@spring.security.saml");
|
||||
username.type("testuser2@spring.security.saml");
|
||||
password.type("12345678");
|
||||
submit.click();
|
||||
this.webClient.waitForBackgroundJavaScript(10000);
|
||||
|
||||
Reference in New Issue
Block a user