1 Reply Latest reply on Sep 24, 2010 3:26 AM by Wahid Atif

    Authentication-method and side-effects

    Wahid Atif Newbie
      Hello Seam-Users,

      I'm trying to include some code in the authenticate-method of the Seam's Authenticator component. But reading the hint under http://docs.jboss.org/seam/2.2.1.CR2/reference/en-US/html_single/#d0e8747 (See Tip below), makes me to wonder how to manage this in a different way and avoiding any side-effects.


      So the scenario is:

      In my Authenticator class, and after successful authentication against the LDAP-Server, I create a user, pick its corresponding info (e.g. first-name, last-name and email) from the AD and save the record to the user-table on a local db.
      But in order to pull the other attributes (first-name...etc), I had to include another method (findUsersByAccountName(accountName)), which initializes the connection  to the LDAP-Service, sets a search-filter up and stores the found record into a list.
      In the authenticate-method above I only need to pass the entered username to findUsersByAccountName(accountName), to get the wanted user info.

      So considering the mentioned tip above on Seam's documentation, and even my code is working now out-of-the-box, is it "very advisable" to solve this in a different manner? If yes, I need your suggestions.

      Thanks in Advance