Aug 27th, 2010, 04:32 AM
[Solved] Configuring ProviderManager's exceptionMappings via namespace?
Pretty straightforward question here. I note that as per SEC-438 one can now easily configure custom exception mappings on the ProviderManager.
However, the namespace-based configuration does not appear to expose any way control these; neither by an attribute on the <security:authentication-manager> element (as you can for the ConcurrentSessionController), nor by an element that allows you to mark an explicit bean as the authentication manager for this config (as you can with e.g. <security:authentication-provider for an individual provider).
Is this correct? If I want to configure the exception mappings of the ProviderManager, do I have to diverge from namespace configuration in its entirety?
If there's a way to slot this configuration into an existing namespace-based Spring file, I'd be happy to hear it. (And in fact, if there isn't I'd be glad to hear it confirmed, to stop me searching in vain... )
Last edited by dtsazza; Aug 27th, 2010 at 05:24 AM.
Reason: Adding Solved tag
Aug 27th, 2010, 05:23 AM
After some further investigation I appear to have solved this.
I created a bean implementing ProviderManager in my configuration, and lo and behold it was automatically picked up and used as the manager by Spring Security.
So I don't know if this is the officially blessed method, or whether I just happened to get lucky by coincidence, but right not it appears that this solves my issue.
(If someone that understands the wiring would like to confirm or contest my belief, and/or explain limitations, that would be good too!)
Tags for this Thread