1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.acegisecurity.providers.jaas;
17
18 import org.acegisecurity.AcegiSecurityException;
19
20 import javax.security.auth.login.LoginException;
21
22
23 /***
24 * The JaasAuthenticationProvider takes an instance of LoginExceptionResolver
25 * to resolve LoginModule specific exceptions to Acegi exceptions. For
26 * instance, a configured login module could throw a
27 * ScrewedUpPasswordException that extends LoginException, in this instance
28 * the LoginExceptionResolver implementation would return a {@link
29 * org.acegisecurity.BadCredentialsException}.
30 *
31 * @author Ray Krueger
32 * @version $Revision: 1.3 $
33 */
34 public interface LoginExceptionResolver {
35
36
37 /***
38 * Translates a Jaas LoginException to an AcegiSecurityException.
39 *
40 * @param e The LoginException thrown by the configured LoginModule.
41 *
42 * @return The AcegiSecurityException that the JaasAuthenticationProvider
43 * should throw.
44 */
45 public AcegiSecurityException resolveException(LoginException e);
46 }