3 Replies Latest reply on Apr 9, 2013 12:34 AM by gunslanger

    How does ManagedConnectionFactoryName get configured with the new Picketbox LoginModule classes?

    pugsherpa

      Our custom LoginModule used to extend org.jboss.resource.security.AbstractPasswordCredentialLoginModule

       

      Class HibernateLoginModule:

      {code}

      public boolean commit() throws LoginException{

           boolean result=false;

           PasswordCredential cred = new PasswordCredentail(username, password.toCharArray());

           cred.setManagedConnectionFactory(getMcf());

           subject.getPrivateCredentials().add(cred);

      ....

       

      }

      {code}

       

      The getMcf() class doesn't exist in the new class org.picketbox.datasource.security.AbstractPasswordCredentialLoginModule

       

      How do we get the managedConnectionFactoryName from the module's configuration? 

       

       

      {code:xml}

      <security-domain name="fishstore-db">

           <authentication>

                <login-module code="fishstore.HibernateLoginModule" flag="required">

                     .....

                     <module-option name="managedConnectionFactoryName" value="jboss.jca:service=LocalTxCM,name="java:jboss/fishstore/fishstoreDataSource"/>

                     .....

                </login-module>

          </authentication>

      </security-domain>

      {code}