A little help with messages.properties
Wessel, Keith
kwessel at illinois.edu
Thu Feb 10 00:42:16 UTC 2022
Hi, all,
I'm trying to get clever with the context check intercept flow and, if ContextCheckDenied is return, first look for a title, header, and message containing the entity ID in the message key before falling through to the default. I'm not getting it to match, though.
In messages.properties, I have:
ContextCheckDenied-https\://sp.example.illinois.edu/shibboleth = sp-example-context-check-denied
Sp-example-context-check-denied.title = No Soup for You
Sp-example-context-check-denied.header = Not eligible to access
Sp-example-context-check-denied.message = Some access denied message goes here
Note I'm escaping the colon in the first line, similar to what's done with the terms-of-use keys. I tried both with and without escaping it, no change.
My error.vm contains this snippet:
#if ($eventId == "ContextCheckDenied")
#set ($titleSuffix = $springMacroRequestContext.getMessage("${eventKey}-${entityID}.title", "$defaultTitleSuffix"))
#set ($header = $springMacroRequestContext.getMessage("${eventKey}-${entityID}.header", "$defaultHeader"))
#set ($message = $springMacroRequestContext.getMessage("${eventKey}-${entityID}.message", "$defaultTitleSuffix:$eventId }"))
#end
The idea, obviously, is to have specific messages for context check denied conditions for different SPs without creating a separate custom event for each.
But when the errors.vm is rendered, it always displays the default errors, not the ones I added.
What am I missing?
Alternatively, what logging class would I turn up to see details logging for message resolution?
Thanks,
Keith
More information about the users
mailing list