Topic
  • 4 replies
  • Latest Post - ‏2011-05-14T09:46:14Z by SystemAdmin
SystemAdmin
SystemAdmin
37421 Posts

Pinned topic Form based login

‏2011-05-11T14:07:33Z |
Hi,

I have created the custom registry with database.

When it is tested with

<login-config>
<auth-method>BASIC</auth-method>
</login-config>

The secured resources are showing after authenticating.
But if I use FORM based authentication, then if the login informations are wrong, it shows the error page, and if the login informations are correct, it is not redirecting to the requested resources.(again it is showing the same login page and request.getUserPrinciple() is also null)

<login-config>
  • <auth-method>FORM</auth-method>*
  • <form-login-config>*
  • <form-login-page>/login.jsp</form-login-page>*
  • <form-error-page>/error.jsp</form-error-page>*
  • </form-login-config>*
</login-config>

This is my login page code

<form action="j_security_check" method="post">
<table cellpadding="0" cellspacing="0" width="100%">
* <tr>*
* <td>User Name</td>*
* <td><input type="text" name="j_username" size="20"/></td>*
* </tr>*
* <tr>*
* <td>Password</td>*
* <td><input type="password" name="j_password" size="20"/></td>*
* </tr>*
* <tr>*
* <td colspan="2"><input type="submit" value="login"/></td>*
* </tr>*
</table>
</form>

I didn't configure any filter on j_security_check.
Kindly advise me if anybody have the suggestions.

Thanks in advance
Updated on 2011-05-14T09:46:14Z at 2011-05-14T09:46:14Z by SystemAdmin
  • mleejr
    mleejr
    4 Posts

    Re: Form based login

    ‏2011-05-11T14:30:36Z  
    Wow. I just logged in for the first time and am having the same problem! Except I found a workaround. Try logging in to the ibm console using the user for your app. It will fail for the console but your user will be authenticated for your app in a new tab. The session is stored across browser tabs. The ibm console message is bad username and/or password but that is not correct. It is actually a permissions thing and the error message should be updated accordingly. Also, why can I not log into my app using my log in page? I don't even get the error page! It just goes right back to the log in page when I use the correct credentials.
  • SystemAdmin
    SystemAdmin
    37421 Posts

    Re: Form based login

    ‏2011-05-11T18:00:09Z  
    Hi
    Can you go to this application in the admin console and try to check the Security role to user/group mapping. Check if there is an AllAuthenticated role defined and the check box for everyone or All Authenticated is checked. And make sure the Golbal security/application security is turned on.

    Thanks
    Satish
  • SystemAdmin
    SystemAdmin
    37421 Posts

    Re: Form based login

    ‏2011-05-14T05:04:34Z  
    Hi
    Can you go to this application in the admin console and try to check the Security role to user/group mapping. Check if there is an AllAuthenticated role defined and the check box for everyone or All Authenticated is checked. And make sure the Golbal security/application security is turned on.

    Thanks
    Satish
    Hi

    Below is the configurations

    Security role to user/group mapping -> Special subjects -> All Authenticated in Application's Realm

    and in security

    Application Security -> Customize for this domain Enable application security is enabled.
    Please advise me.
    Thanks,
  • SystemAdmin
    SystemAdmin
    37421 Posts

    Re: Form based login

    ‏2011-05-14T09:46:14Z  
    Hi
    Can you go to this application in the admin console and try to check the Security role to user/group mapping. Check if there is an AllAuthenticated role defined and the check box for everyone or All Authenticated is checked. And make sure the Golbal security/application security is turned on.

    Thanks
    Satish
    Hi,

    Is it necessary to enable the SSL for form based authentication or will it work with http.

    If SSL is required, pls provide the link which has the configuration details of SSL.
    Thanks,