From 043acf17b7b8432f0a0d37e802c78a8d4d0ae80c Mon Sep 17 00:00:00 2001 From: Joe Grandja Date: Mon, 1 May 2023 10:35:49 -0400 Subject: [PATCH] Reuse error handling Issue gh-1189 --- ...oller.java => DefaultErrorController.java} | 2 +- .../resources/templates/access-denied.html | 19 +++++++------------ .../src/main/resources/templates/error.html | 19 +++++++------------ 3 files changed, 15 insertions(+), 25 deletions(-) rename samples/featured-authorizationserver/src/main/java/sample/web/{DeviceErrorController.java => DefaultErrorController.java} (95%) diff --git a/samples/featured-authorizationserver/src/main/java/sample/web/DeviceErrorController.java b/samples/featured-authorizationserver/src/main/java/sample/web/DefaultErrorController.java similarity index 95% rename from samples/featured-authorizationserver/src/main/java/sample/web/DeviceErrorController.java rename to samples/featured-authorizationserver/src/main/java/sample/web/DefaultErrorController.java index 7ad9750e..f4e55c6e 100644 --- a/samples/featured-authorizationserver/src/main/java/sample/web/DeviceErrorController.java +++ b/samples/featured-authorizationserver/src/main/java/sample/web/DefaultErrorController.java @@ -30,7 +30,7 @@ import org.springframework.web.servlet.ModelAndView; * @since 1.1 */ @Controller -public class DeviceErrorController implements ErrorController { +public class DefaultErrorController implements ErrorController { @RequestMapping("/error") public ModelAndView handleError(HttpServletRequest request) { diff --git a/samples/featured-authorizationserver/src/main/resources/templates/access-denied.html b/samples/featured-authorizationserver/src/main/resources/templates/access-denied.html index e69a32c8..c358bc7b 100644 --- a/samples/featured-authorizationserver/src/main/resources/templates/access-denied.html +++ b/samples/featured-authorizationserver/src/main/resources/templates/access-denied.html @@ -3,23 +3,18 @@ - Device Grant Example + Spring Security Example -
-
-
-
-

Access Denied

-

You have denied access. Please return to your device to continue.

-
-
- Devices -
+
+
+
+

Access Denied

+

You have denied access.

- \ No newline at end of file + diff --git a/samples/featured-authorizationserver/src/main/resources/templates/error.html b/samples/featured-authorizationserver/src/main/resources/templates/error.html index 11088646..7bf6baae 100644 --- a/samples/featured-authorizationserver/src/main/resources/templates/error.html +++ b/samples/featured-authorizationserver/src/main/resources/templates/error.html @@ -3,23 +3,18 @@ - Device Grant Example + Spring Security Example -
-
-
-
-

Error

-

-
-
- Devices -
+
+
+
+

Error

+

- \ No newline at end of file +