[java-identity-provider] 11/28: IDP-2215 - Add additional objects to MVC-layer error view
Scott Cantor
cantor.2 at osu.edu
Wed Jan 31 14:51:57 UTC 2024
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch dev/thymeleaf
in repository java-identity-provider.
View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=50fa1704d537fa1b04ee336acabb97a30f860e3d
commit 50fa1704d537fa1b04ee336acabb97a30f860e3d
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Mon Dec 18 09:53:14 2023 -0500
IDP-2215 - Add additional objects to MVC-layer error view
https://shibboleth.atlassian.net/browse/IDP-2215
Wired additional objects into exception resolver.
Adjusted error.vm comments.
---
.../resources/net/shibboleth/idp/conf/mvc-beans.xml | 3 +++
.../net/shibboleth/idp/module/views/error.vm | 19 ++++++++++++-------
2 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/idp-conf-impl/src/main/resources/net/shibboleth/idp/conf/mvc-beans.xml b/idp-conf-impl/src/main/resources/net/shibboleth/idp/conf/mvc-beans.xml
index b7ade04c1..9e9589da7 100644
--- a/idp-conf-impl/src/main/resources/net/shibboleth/idp/conf/mvc-beans.xml
+++ b/idp-conf-impl/src/main/resources/net/shibboleth/idp/conf/mvc-beans.xml
@@ -67,6 +67,9 @@
<bean id="shibboleth.ExceptionResolver" class="net.shibboleth.shared.spring.error.ExtendedMappingExceptionResolver"
c:_0="#{getObject('shibboleth.ExceptionResolverViewExtenderFunction')}"
+ p:cSPDigester-ref="shibboleth.CSPDigester"
+ p:cSPNonceGenerator-ref="shibboleth.CSPNonce"
+ p:customObject="#{getObject('shibboleth.CustomViewContext')}"
p:defaultErrorView="%{idp.errors.defaultView:error}"
p:excludedExceptions="#{getObject('%{idp.errors.excludedExceptions:undefined}')}"
p:exceptionMappings="#{getObject('%{idp.errors.exceptionMappings:undefined}')}" />
diff --git a/idp-conf-impl/src/main/resources/net/shibboleth/idp/module/views/error.vm b/idp-conf-impl/src/main/resources/net/shibboleth/idp/module/views/error.vm
index efc943148..623449d7d 100644
--- a/idp-conf-impl/src/main/resources/net/shibboleth/idp/module/views/error.vm
+++ b/idp-conf-impl/src/main/resources/net/shibboleth/idp/module/views/error.vm
@@ -2,19 +2,21 @@
## Velocity Template for error end-state
##
## Velocity context will contain the following variables during controlled errors.
-## Some error paths involve runtime exceptions handled outside Spring Web Flow by the
-## MVC layer and will not generally populate most of these variables.
##
-## flowRequestContext - the Spring Web Flow RequestContext
-## profileRequestContext - root of context tree
-## encoder - HTMLEncoder class
-## cspDigester - Calculates base64-encoded SHA-2 hashes (call apply)
-## cspNonce - Calculates secure nonces (call generateIdentifier)
## request - HttpServletRequest
## response - HttpServletResponse
## environment - Spring Environment object for property resolution
+## encoder - HTMLEncoder class
+## cspDigester - Calculates base64-encoded SHA-2 hashes (call apply)
+## cspNonce - Calculates secure nonces (call generateIdentifier)
## custom - arbitrary object injected by deployer
##
+## Some error paths involve runtime exceptions handled outside Spring Web Flow by the
+## MVC layer and will not generally populate these variables:
+##
+## flowRequestContext - the Spring Web Flow RequestContext
+## profileRequestContext - root of context tree
+##
#set ($title = $springMacroRequestContext.getMessage("idp.title", "Web Login Service"))
#set ($defaultTitleSuffix = $springMacroRequestContext.getMessage("idp.title.suffix", "Error"))
##
@@ -71,6 +73,9 @@ $response.addHeader("Content-Security-Policy", "script-src 'none'")
<footer class="footer">
<div class="cc">
<p>#springMessageText("idp.footer", "Insert your footer text here.")</p>
+ <p>$cspDigester</p>
+ <p>$cspNonce</p>
+ <p>$custom</p>
</div>
</footer>
</body>
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list