Hi,
How can one add extra exception mappings, so they can be processed to publish custom events on custom exceptions from additionalAuthenticationChecks() from overridden DaoAuthenticationProvider.
Regards and thanks
Hi,
How can one add extra exception mappings, so they can be processed to publish custom events on custom exceptions from additionalAuthenticationChecks() from overridden DaoAuthenticationProvider.
Regards and thanks
This is what you're after?
http://www.acegisecurity.org/multipr...il.Properties)
Thanks for the reply, but i am not sure how to extend this to add exceptionMappings to ProviderManager, the doAddExtraDefaultExceptionMappings(Properties) method gives handle to the class level static DEFAULT_EXCEPTION_MAPPINGS but not the instance level exceptionMappings which are being used in "public Authentication doAuthentication(Authentication authentication)".
Ahhh just looking at the code, I see your point. I also think you might have found a bug! The DEFAULT_EXCEPTION_MAPPINGS are added to the exceptionMappings in the constructor. This is then used in the doAuthentication method. I'm pretty sure the exceptionMappings properties are supposed to be passed into doAddExtraDefaultExceptionMappings(..). You could patch this yourself. I would also have a look in JIRA and see if this has already been raised.
http://opensource.atlassian.com/proj...Dashboard.jspa
Current....
Should be....Code:public ProviderManager() { exceptionMappings.putAll(DEFAULT_EXCEPTION_MAPPINGS); } public void afterPropertiesSet() throws Exception { checkIfValidList(this.providers); Assert.notNull(this.messages, "A message source must be set"); doAddExtraDefaultExceptionMappings(DEFAULT_EXCEPTION_MAPPINGS); }
Code:public void afterPropertiesSet() throws Exception { checkIfValidList(this.providers); Assert.notNull(this.messages, "A message source must be set"); doAddExtraDefaultExceptionMappings(exceptionMappings); }
Thanks once again, ive added this to JIRA.
Any chance you could post the JIRA link back here for reference?
here it is ...
http://opensource.atlassian.com/proj...browse/SEC-438