01: /* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
02: *
03: * Licensed under the Apache License, Version 2.0 (the "License");
04: * you may not use this file except in compliance with the License.
05: * You may obtain a copy of the License at
06: *
07: * http://www.apache.org/licenses/LICENSE-2.0
08: *
09: * Unless required by applicable law or agreed to in writing, software
10: * distributed under the License is distributed on an "AS IS" BASIS,
11: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12: * See the License for the specific language governing permissions and
13: * limitations under the License.
14: */
15:
16: package org.acegisecurity.userdetails;
17:
18: import org.acegisecurity.BadCredentialsException;
19:
20: /**
21: * Thrown if an {@link UserDetailsService} implementation cannot locate a {@link User} by its username.
22: *
23: * @author Ben Alex
24: * @version $Id: UsernameNotFoundException.java 1964 2007-08-27 23:22:48Z luke_t $
25: */
26: public class UsernameNotFoundException extends BadCredentialsException {
27: //~ Constructors ===================================================================================================
28:
29: /**
30: * Constructs a <code>UsernameNotFoundException</code> with the specified
31: * message.
32: *
33: * @param msg the detail message.
34: */
35: public UsernameNotFoundException(String msg) {
36: super (msg);
37: }
38:
39: /**
40: * Constructs a <code>UsernameNotFoundException</code>, making use of the <tt>extraInformation</tt>
41: * property of the superclass.
42: *
43: * @param msg the detail message
44: * @param extraInformation additional information such as the username.
45: */
46: public UsernameNotFoundException(String msg, Object extraInformation) {
47: super (msg, extraInformation);
48: }
49:
50: /**
51: * Constructs a <code>UsernameNotFoundException</code> with the specified
52: * message and root cause.
53: *
54: * @param msg the detail message.
55: * @param t root cause
56: */
57: public UsernameNotFoundException(String msg, Throwable t) {
58: super(msg, t);
59: }
60: }
|