Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
IncorrectCredentialsException |
|
| 1.0;1 |
1 | /* | |
2 | * Licensed to the Apache Software Foundation (ASF) under one | |
3 | * or more contributor license agreements. See the NOTICE file | |
4 | * distributed with this work for additional information | |
5 | * regarding copyright ownership. The ASF licenses this file | |
6 | * to you under the Apache License, Version 2.0 (the | |
7 | * "License"); you may not use this file except in compliance | |
8 | * with the License. You may obtain a copy of the License at | |
9 | * | |
10 | * http://www.apache.org/licenses/LICENSE-2.0 | |
11 | * | |
12 | * Unless required by applicable law or agreed to in writing, | |
13 | * software distributed under the License is distributed on an | |
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | |
15 | * KIND, either express or implied. See the License for the | |
16 | * specific language governing permissions and limitations | |
17 | * under the License. | |
18 | */ | |
19 | package org.apache.shiro.authc; | |
20 | ||
21 | /** | |
22 | * Thrown when attempting to authenticate with credential(s) that do not match the actual | |
23 | * credentials associated with the account principal. | |
24 | * | |
25 | * <p>For example, this exception might be thrown if a user's password is "secret" and | |
26 | * "secrets" was entered by mistake. | |
27 | * | |
28 | * <p>Whether or not an application wishes to let | |
29 | * the user know if they entered incorrect credentials is at the discretion of those | |
30 | * responsible for defining the view and what happens when this exception occurs. | |
31 | * | |
32 | * @since 0.1 | |
33 | */ | |
34 | public class IncorrectCredentialsException extends CredentialsException { | |
35 | ||
36 | /** | |
37 | * Creates a new IncorrectCredentialsException. | |
38 | */ | |
39 | public IncorrectCredentialsException() { | |
40 | 1 | super(); |
41 | 1 | } |
42 | ||
43 | /** | |
44 | * Constructs a new IncorrectCredentialsException. | |
45 | * | |
46 | * @param message the reason for the exception | |
47 | */ | |
48 | public IncorrectCredentialsException(String message) { | |
49 | 5 | super(message); |
50 | 5 | } |
51 | ||
52 | /** | |
53 | * Constructs a new IncorrectCredentialsException. | |
54 | * | |
55 | * @param cause the underlying Throwable that caused this exception to be thrown. | |
56 | */ | |
57 | public IncorrectCredentialsException(Throwable cause) { | |
58 | 1 | super(cause); |
59 | 1 | } |
60 | ||
61 | /** | |
62 | * Constructs a new IncorrectCredentialsException. | |
63 | * | |
64 | * @param message the reason for the exception | |
65 | * @param cause the underlying Throwable that caused this exception to be thrown. | |
66 | */ | |
67 | public IncorrectCredentialsException(String message, Throwable cause) { | |
68 | 1 | super(message, cause); |
69 | 1 | } |
70 | ||
71 | } |