Commit 6bf71c43921adc7e15cc8ed29797a1e472b350fb
1 parent
b1e021f0
Exists in
master
Adicionado nova causa no tratamento de exceção do método authenticate.
Showing
1 changed file
with
2 additions
and
1 deletions
Show diff stats
impl/extension/servlet/src/main/java/br/gov/frameworkdemoiselle/security/ServletAuthenticator.java
@@ -69,7 +69,8 @@ public class ServletAuthenticator implements Authenticator { | @@ -69,7 +69,8 @@ public class ServletAuthenticator implements Authenticator { | ||
69 | 69 | ||
70 | } catch (ServletException cause) { | 70 | } catch (ServletException cause) { |
71 | if (cause.getMessage().toLowerCase().contains("invalid") | 71 | if (cause.getMessage().toLowerCase().contains("invalid") |
72 | - || cause.getMessage().toLowerCase().contains("incorrect")) { | 72 | + || cause.getMessage().toLowerCase().contains("incorrect") |
73 | + || cause.getMessage().toLowerCase().contains("failed") ) { | ||
73 | throw new InvalidCredentialsException(getBundle().getString("invalid-credentials")); | 74 | throw new InvalidCredentialsException(getBundle().getString("invalid-credentials")); |
74 | } else { | 75 | } else { |
75 | throw new AuthenticationException(getBundle().getString("authentication-failed"), cause); | 76 | throw new AuthenticationException(getBundle().getString("authentication-failed"), cause); |