Skip to content

Commit

Permalink
add null check for authentication status
Browse files Browse the repository at this point in the history
  • Loading branch information
sbryzak committed Mar 22, 2011
1 parent decbcaf commit 35bafc3
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions impl/src/main/java/org/jboss/seam/security/IdentityImpl.java
Expand Up @@ -309,6 +309,11 @@ protected boolean authenticate() throws AuthenticationException

activeAuthenticator.authenticate();

if (activeAuthenticator.getStatus() == null)
{
throw new AuthenticationException("Authenticator must return a valid authentication status");
}

switch (activeAuthenticator.getStatus())
{
case SUCCESS:
Expand All @@ -317,8 +322,8 @@ protected boolean authenticate() throws AuthenticationException
case FAILURE:
authenticating = false;
return false;
}
}

return false;
}
catch (Exception ex)
Expand Down

0 comments on commit 35bafc3

Please sign in to comment.