Index: AuthenticationService.java =================================================================== --- AuthenticationService.java (revision 412203) +++ AuthenticationService.java (working copy) @@ -449,6 +449,7 @@ } // try each authenticators + String explanations = ""; for ( Iterator i = authenticators.iterator(); i.hasNext(); ) { Authenticator authenticator = ( Authenticator ) i.next(); @@ -469,6 +470,12 @@ { log.info( "Authenticator " + authenticator.getClass() + " failed to authenticate " + bindDn ); } + if (e.getMessage() != null && e.getMessage().trim().length() > 0) { + if (explanations.length()>0) { + explanations += " - "; + } + explanations += e.getMessage(); + } } catch ( Exception e ) { @@ -477,10 +484,16 @@ { log.warn( "Unexpected exception from " + authenticator.getClass() + " for principal " + bindDn, e ); } + if (e.getMessage() != null && e.getMessage().trim().length() > 0) { + if (explanations.length()>0) { + explanations += " - "; + } + explanations += e.getMessage(); + } } } - throw new LdapAuthenticationException(); + throw new LdapAuthenticationException(explanations); } /**