LDAP Error Code Messaging
Cantor, Scott
cantor.2 at osu.edu
Mon Nov 5 16:25:53 EST 2018
> We want to replace it to 'Account is Inactivated. Contact Help Desk at
> www.foodbar.com <http://www.foodbar.com> '. Is there a pre-existing flow
> that is generating above message, and I can subjugate to new message?
The defaults are:
The shibboleth.authn.Password.ClassifiedMessageMap bean translates LDAP error string into classified event.
The views/login-error.vm file has examples for extracting a classified event if it exists and turning it into a user message:
#set ($eventId = $authenticationErrorContext.getClassifiedErrors().iterator().next())
#set ($eventKey = $springMacroRequestContext.getMessage("$eventId", "login"))
#set ($message = $springMacroRequestContext.getMessage("${eventKey}.message", "Login Failure: $eventId"))
All the default messages are in system/messages/messages.properties and are overrideable in messages/messages.properties.
If a message maps to AccountLocked, the default message is " Your account is locked." and that's what gets displayed. If it's not being displayed, you just didn't map the relevant LDAP error message or a subset of it to the AccountLocked event name in the message maps that I'm talking about. And if you want to change the message, look at the system message file and override the message property you want to replace in your own message file.
In practice it's a couple of simple additions to two files and restart.
-- Scott
More information about the users
mailing list