2 Replies Latest reply on Sep 7, 2001 4:50 AM by Jochen Riekhof

    DatabaseLoginModule does not recognize password (but finds P

    Jochen Riekhof Newbie


      I am stuck with the DatabaseLoginModule. I made a simple table (Oracle) containing a user/password pair.
      Module config is:
      testapp {
      org.jboss.security.auth.spi.DatabaseServerLoginModule required
      principalsQuery="select Password from Principals where PrincipalID=?"
      rolesQuery="select Role, RoleGroup from Roles where PrincipalID=?"

      Here is the error message:
      User 'jri' authenticated.
      [TestSession] Bad password for username=jri
      [TestSession] LoginException: Password Incorrect/Password Required

      Any idea? I had a look into the DatabaseLoginModule code and it seems that the query succeded (password is definitely the same as in client).
      I also made a test app with the copied-out code from DatabaseLoginModule an it worked. Also when I remove the PrincipalID form the db the error reads:
      [TestSession] LoginException: No matching username found in Principals
      [TestSession] Authentication exception, principal=jri