Skip to content

Commit

Permalink
Fix test user for SAML samples
Browse files Browse the repository at this point in the history
Closes gh-124
  • Loading branch information
marcusdacoregio committed Mar 8, 2023
1 parent d080723 commit 8796e16
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion servlet/java-configuration/saml2/login/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,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
```

Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ void setup() {
void authenticationAttemptWhenValidThenShowsUserEmailAddress() throws Exception {
performLogin();
HtmlPage home = (HtmlPage) this.webClient.getCurrentWindow().getEnclosedPage();
assertThat(home.asNormalizedText()).contains("You're email address is testuser@spring.security.saml");
assertThat(home.asNormalizedText()).contains("You're email address is testuser2@spring.security.saml");
}

@Test
Expand Down Expand Up @@ -106,7 +106,7 @@ private void performLogin() throws Exception {
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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ void setup() {
void authenticationAttemptWhenValidThenShowsUserEmailAddress() throws Exception {
performLogin();
HtmlPage home = (HtmlPage) this.webClient.getCurrentWindow().getEnclosedPage();
assertThat(home.asNormalizedText()).contains("You're email address is testuser@spring.security.saml");
assertThat(home.asNormalizedText()).contains("You're email address is testuser2@spring.security.saml");
}

@Test
Expand Down Expand Up @@ -88,7 +88,7 @@ private void performLogin() throws Exception {
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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,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
```

Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void setup() {
void authenticationAttemptWhenValidThenShowsUserEmailAddress() throws Exception {
performLogin();
HtmlPage home = (HtmlPage) this.webClient.getCurrentWindow().getEnclosedPage();
assertThat(home.asNormalizedText()).contains("You're email address is testuser@spring.security.saml");
assertThat(home.asNormalizedText()).contains("You're email address is testuser2@spring.security.saml");
}

@Test
Expand Down Expand Up @@ -88,7 +88,7 @@ private void performLogin() throws Exception {
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);
Expand Down
2 changes: 1 addition & 1 deletion servlet/spring-boot/java/saml2/login/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,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
```

Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void setup() {
void authenticationAttemptWhenValidThenShowsUserEmailAddress() throws Exception {
performLogin();
HtmlPage home = (HtmlPage) this.webClient.getCurrentWindow().getEnclosedPage();
assertThat(home.asNormalizedText()).contains("You're email address is testuser@spring.security.saml");
assertThat(home.asNormalizedText()).contains("You're email address is testuser2@spring.security.saml");
}

@Test
Expand Down Expand Up @@ -88,7 +88,7 @@ private void performLogin() throws Exception {
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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ void setup() {
void authenticationAttemptWhenValidThenShowsUserEmailAddress() throws Exception {
performLogin();
HtmlPage home = (HtmlPage) this.webClient.getCurrentWindow().getEnclosedPage();
assertThat(home.asNormalizedText()).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 {
Expand All @@ -62,7 +62,7 @@ private void performLogin() throws Exception {
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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ void setup() {
void authenticationAttemptWhenValidThenShowsUserEmailAddress() throws Exception {
performLogin();
HtmlPage home = (HtmlPage) this.webClient.getCurrentWindow().getEnclosedPage();
assertThat(home.asNormalizedText()).contains("You're email address is testuser@spring.security.saml");
assertThat(home.asNormalizedText()).contains("You're email address is testuser2@spring.security.saml");
}

@Test
Expand Down Expand Up @@ -105,7 +105,7 @@ private void performLogin() throws Exception {
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);
Expand Down

0 comments on commit 8796e16

Please sign in to comment.