0 Replies Latest reply on Oct 31, 2009 7:12 AM by Jakub Pawlowski

    Custom login module & additional parameters

    Jakub Pawlowski Newbie

      Hi,

      I created custom jdbc login module. I configured it in server.xml as folowing:

      <Realm className="org.apache.catalina.realm.JAASRealm"
       appName="CustomDBLoginModule"
       userClassNames="kuba.demo.CuslomUserPrincipal"
       roleClassNames="kuba.demo.CuslomRolePrincipal"
       debug="99"/>



      Is this possible to pass additional parameters to my login module class ? I mean something like this:

      <Realm className="org.apache.catalina.realm.JAASRealm"
       appName="CustomDBLoginModule"
       userClassNames="kuba.demo.CuslomUserPrincipal"
       roleClassNames="kuba.demo.CuslomRolePrincipal"
       driverName="org.gjt.mm.mysql.Driver"
       connectionURL="jdbc:mysql://localhost/authority?user=dbuser&password=dbpass"
       userTable="users" userNameCol="user_name" userCredCol="user_pass"
       userRoleTable="user_roles" roleNameCol="role_name
       debug="99"/>


      If that, how can I get these parametrers in my logim module class ?

      Kuba