Skip to content

Commit d32c185

Browse files
committed
Fix redirect loop in default/demo-authorizationserver samples
Closes gh-1920
1 parent 81c25ef commit d32c185

8 files changed

+35
-35
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
spring-security.version=6.3.7
1+
spring-security.version=6.5.0-M2

samples/default-authorizationserver/samples-default-authorizationserver.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
id "org.springframework.boot" version "3.2.2"
2+
id "org.springframework.boot" version "3.4.3"
33
id "io.spring.dependency-management" version "1.1.0"
44
id "java"
55
}
@@ -25,7 +25,7 @@ dependencies {
2525
testImplementation "org.springframework.boot:spring-boot-starter-test"
2626
testImplementation "org.springframework.security:spring-security-test"
2727
testImplementation "org.junit.jupiter:junit-jupiter"
28-
testImplementation "net.sourceforge.htmlunit:htmlunit"
28+
testImplementation "org.htmlunit:htmlunit"
2929
}
3030

3131
tasks.named("test") {

samples/default-authorizationserver/src/test/java/sample/DefaultAuthorizationServerApplicationTests.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020-2022 the original author or authors.
2+
* Copyright 2020-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -17,13 +17,13 @@
1717

1818
import java.io.IOException;
1919

20-
import com.gargoylesoftware.htmlunit.Page;
21-
import com.gargoylesoftware.htmlunit.WebClient;
22-
import com.gargoylesoftware.htmlunit.WebResponse;
23-
import com.gargoylesoftware.htmlunit.html.HtmlButton;
24-
import com.gargoylesoftware.htmlunit.html.HtmlElement;
25-
import com.gargoylesoftware.htmlunit.html.HtmlInput;
26-
import com.gargoylesoftware.htmlunit.html.HtmlPage;
20+
import org.htmlunit.Page;
21+
import org.htmlunit.WebClient;
22+
import org.htmlunit.WebResponse;
23+
import org.htmlunit.html.HtmlButton;
24+
import org.htmlunit.html.HtmlElement;
25+
import org.htmlunit.html.HtmlInput;
26+
import org.htmlunit.html.HtmlPage;
2727
import org.junit.jupiter.api.BeforeEach;
2828
import org.junit.jupiter.api.Test;
2929
import org.junit.jupiter.api.extension.ExtendWith;
@@ -86,7 +86,7 @@ public void whenLoginFailsThenDisplayBadCredentials() throws IOException {
8686

8787
HtmlElement alert = loginErrorPage.querySelector("div[role=\"alert\"]");
8888
assertThat(alert).isNotNull();
89-
assertThat(alert.getTextContent()).isEqualTo("Bad credentials");
89+
assertThat(alert.getTextContent()).isEqualTo("Invalid credentials");
9090
}
9191

9292
@Test

samples/default-authorizationserver/src/test/java/sample/DefaultAuthorizationServerConsentTests.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020-2022 the original author or authors.
2+
* Copyright 2020-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -19,11 +19,11 @@
1919
import java.util.ArrayList;
2020
import java.util.List;
2121

22-
import com.gargoylesoftware.htmlunit.WebClient;
23-
import com.gargoylesoftware.htmlunit.WebResponse;
24-
import com.gargoylesoftware.htmlunit.html.DomElement;
25-
import com.gargoylesoftware.htmlunit.html.HtmlCheckBoxInput;
26-
import com.gargoylesoftware.htmlunit.html.HtmlPage;
22+
import org.htmlunit.WebClient;
23+
import org.htmlunit.WebResponse;
24+
import org.htmlunit.html.DomElement;
25+
import org.htmlunit.html.HtmlCheckBoxInput;
26+
import org.htmlunit.html.HtmlPage;
2727
import org.junit.jupiter.api.BeforeEach;
2828
import org.junit.jupiter.api.Test;
2929
import org.junit.jupiter.api.extension.ExtendWith;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
spring-security.version=6.3.7
1+
spring-security.version=6.5.0-M2

samples/demo-authorizationserver/samples-demo-authorizationserver.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
id "org.springframework.boot" version "3.2.2"
2+
id "org.springframework.boot" version "3.4.3"
33
id "io.spring.dependency-management" version "1.1.0"
44
id "java"
55
}
@@ -29,7 +29,7 @@ dependencies {
2929
testImplementation "org.springframework.boot:spring-boot-starter-test"
3030
testImplementation "org.springframework.security:spring-security-test"
3131
testImplementation "org.junit.jupiter:junit-jupiter"
32-
testImplementation "net.sourceforge.htmlunit:htmlunit"
32+
testImplementation "org.htmlunit:htmlunit"
3333
}
3434

3535
tasks.named("test") {

samples/demo-authorizationserver/src/test/java/sample/DemoAuthorizationServerApplicationTests.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020-2024 the original author or authors.
2+
* Copyright 2020-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -17,13 +17,13 @@
1717

1818
import java.io.IOException;
1919

20-
import com.gargoylesoftware.htmlunit.Page;
21-
import com.gargoylesoftware.htmlunit.WebClient;
22-
import com.gargoylesoftware.htmlunit.WebResponse;
23-
import com.gargoylesoftware.htmlunit.html.HtmlButton;
24-
import com.gargoylesoftware.htmlunit.html.HtmlElement;
25-
import com.gargoylesoftware.htmlunit.html.HtmlInput;
26-
import com.gargoylesoftware.htmlunit.html.HtmlPage;
20+
import org.htmlunit.Page;
21+
import org.htmlunit.WebClient;
22+
import org.htmlunit.WebResponse;
23+
import org.htmlunit.html.HtmlButton;
24+
import org.htmlunit.html.HtmlElement;
25+
import org.htmlunit.html.HtmlInput;
26+
import org.htmlunit.html.HtmlPage;
2727
import org.junit.jupiter.api.BeforeEach;
2828
import org.junit.jupiter.api.Test;
2929
import org.junit.jupiter.api.extension.ExtendWith;

samples/demo-authorizationserver/src/test/java/sample/DemoAuthorizationServerConsentTests.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020-2024 the original author or authors.
2+
* Copyright 2020-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -19,11 +19,11 @@
1919
import java.util.ArrayList;
2020
import java.util.List;
2121

22-
import com.gargoylesoftware.htmlunit.WebClient;
23-
import com.gargoylesoftware.htmlunit.WebResponse;
24-
import com.gargoylesoftware.htmlunit.html.DomElement;
25-
import com.gargoylesoftware.htmlunit.html.HtmlCheckBoxInput;
26-
import com.gargoylesoftware.htmlunit.html.HtmlPage;
22+
import org.htmlunit.WebClient;
23+
import org.htmlunit.WebResponse;
24+
import org.htmlunit.html.DomElement;
25+
import org.htmlunit.html.HtmlCheckBoxInput;
26+
import org.htmlunit.html.HtmlPage;
2727
import org.junit.jupiter.api.BeforeEach;
2828
import org.junit.jupiter.api.Test;
2929
import org.junit.jupiter.api.extension.ExtendWith;

0 commit comments

Comments
 (0)