Results 1 to 3 of 3

Thread: Custom Error Messages in Login JSP

  1. #1
    Join Date
    Aug 2004
    Location
    New York
    Posts
    168

    Default Custom Error Messages in Login JSP

    I am using the AuthenticationProcessingFilter for logins to my web application. From a security standpoint everything works nicely, but I am having some trouble customizing the error messages on failed login attempts. The requirements are such that I display error messages indicated the reason for the login failure. These messages include:

    "You have entered an invalid password. "

    and

    "User name not found. "

    The issue is that upon failure, I do not have the necessary information to figure out the reason for the login failure. In both of the cases above, I am forwarded back to a jsp with access to a BadCredentialsException containing a "Bad credentials presented" error message. Am I missing something? Thanks.

    -karl

  2. #2
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    You need to set the DaoAuthenticationProvider.hideUserNotFoundExceptio ns to false (it defaults to true, which is why you get the same exception for both authentication failure reasons).

  3. #3
    Join Date
    Aug 2004
    Location
    New York
    Posts
    168

    Default

    That worked perfectly. Thanks for the unbelievably quick response.

    -karl

Similar Threads

  1. Replies: 2
    Last Post: Aug 2nd, 2006, 10:18 PM
  2. Replies: 3
    Last Post: Nov 15th, 2005, 03:24 PM
  3. Replies: 2
    Last Post: Jul 21st, 2005, 09:34 AM
  4. Creating Custom CAS Login
    By jpwinans in forum Security
    Replies: 5
    Last Post: Feb 8th, 2005, 09:58 PM
  5. Acegi - Login Tapestry
    By john017 in forum Security
    Replies: 1
    Last Post: Feb 4th, 2005, 01:11 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •