0 Replies Latest reply on Jul 6, 2007 10:23 PM by LeQuoc Thai

    I need help. Please guide to me !

    LeQuoc Thai Novice

      Hi all!

      I write GUI to client can enter:

      After, a client login and logout by:
      LoginContext loginContext = new LoginContext("userTest", loginForm);

      Then, if this client relogin. How I setup this client no need enter username and password again (Here, example: I want get two informations: username and password to paste GUI).
      I configure login-config.xml inside conf folder:
       <application-policy name = "YCLINICSE2007">
       <login-module code = "org.jboss.security.ClientLoginModule" flag = "required">
       <module-option name="multi-threaded">true</module-option>
       <!-- Any existing security context will be restored on logout -->
       <module-option name="restore-login-identity">true</module-option>
       <login-module code = "org.jboss.security.auth.spi.DatabaseServerLoginModule"
       flag = "required">
       <module-option name = "unauthenticatedIdentity">guest</module-option>
       <module-option name = "dsJndiName">java:/MySqlDS</module-option>
       <module-option name = "principalsQuery">SELECT PASSWORD FROM USER WHERE USERNAME=?</module-option>
       <module-option name = "rolesQuery">SELECT ROLENAME, 'Roles' FROM USER_IN_ROLE WHERE USERNAME=?</module-option>

      And, on the client side, I have auth.conf:
      userTest {
       //client.security.MyLoginModule required;
       org.jboss.security.ClientLoginModule required;

      And my jboss.xml:
       <!-- <security-domain>java:/jaas/YCLINICSE2007</security-domain> -->

      Thanks! Have a good day !