3 Replies Latest reply on Feb 21, 2008 2:01 AM by Shane Bryzak

    Seam security with JAAS

    Joshua Jackson Master

      Dear all,

      Is there any examples on the authenticate method and login form example if we use JAAS?

      thanks in advance

        • 1. Re: Seam security with JAAS
          Shane Bryzak Master

          Your question isn't really clear.  Seam Security already uses JAAS for authentication.

          • 2. Re: Seam security with JAAS
            Joshua Jackson Master

            Hi Shane, thanks for the reply.
            You know that we usually have to create an authenticator component that has an authenticate method inside it. Usually if we are using JPA, we write the query for fetching the user and password from the database. Now what does need to be written inside the authenticate method if we are using JAAS? I'm still blank and have yet no idea regarding this.

            Thanks in advance

            • 3. Re: Seam security with JAAS
              Shane Bryzak Master

              Seam Security simply uses the JAAS API for authentication - it has a default JAAS configuration which uses a special login module, SeamLoginModule, to carry out the authentication process.  This login module calls your authenticator.authenticate() method to do the actual work of authentication, so it can contain anything you want, whether it is authenticating the user against a database, or performing an LDAP query or anything else you can dream of. 

              Now on the other hand, if you don't want to use the default login module (or write your own authenticator method) then you can configure Seam Security to use an alternative JAAS configuration.  The security chapter of the docs explain how to do this.