Commit 6bf71c43921adc7e15cc8ed29797a1e472b350fb

Authored by Luciano Borges
1 parent b1e021f0
Exists in master

Adicionado nova causa no tratamento de exceção do método authenticate.

impl/extension/servlet/src/main/java/br/gov/frameworkdemoiselle/security/ServletAuthenticator.java
... ... @@ -69,7 +69,8 @@ public class ServletAuthenticator implements Authenticator {
69 69  
70 70 } catch (ServletException cause) {
71 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 74 throw new InvalidCredentialsException(getBundle().getString("invalid-credentials"));
74 75 } else {
75 76 throw new AuthenticationException(getBundle().getString("authentication-failed"), cause);
... ...