1 Reply Latest reply on May 16, 2004 12:53 PM by gorano

    changing roles query and principal query in login-config.xml

    srikrishna kalavacharla Newbie

      I'm trying to change the roles query and principal query so that it will take another parameter(company name) along with the login name.

      I've got the design how to implement this from forums and tried to do as follows:

      1) Implemented MySimplePrincipal which extends SimplePrincipal class and takes username and companyname as the parameters in the constructor. This will help in the process of retrieving the company name.


      1) I've to implement MyClientModule which extends the ClientModule and change every reference to

      Security.setAssociation(principal) to Security.setAssociation(new MySimplePrincipal(username, companyName));

      Here what I'm not sure of is how to get the companyName information from the NameCallback class.

      2) I've to implement MyUserNamePasswordLoginModule and make it store the companyName.
      3) Finally I've to implement MyDatabaseServerLoginModule which extends DatabaseServerLoginModule and get the companyName from the MyUserNamePasswordLoginModule class and set it in the roles query and the principal query.

      I'm just wondering if someone has already done this, or if someone can tell me whether I'm going in the right direction or not.

      Any Help Appreciated