View Javadoc

1   /*
2    * $Id: AuthenticatorService.java 124 2004-11-01 18:09:40Z josem $
3    *
4    * Tarsis
5    * Copyright (C) 2002 Talika Open Source Group
6    *
7    * This program is free software; you can redistribute it and/or modify
8    * it under the terms of the GNU General Public License as published by
9    * the Free Software Foundation; either version 2 of the License, or
10   * (at your option) any later version.
11   *
12   * This program is distributed in the hope that it will be useful,
13   * but WITHOUT ANY WARRANTY; without even the implied warranty of
14   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15   * GNU General Public License for more details.
16   *
17   * You should have received a copy of the GNU General Public License
18   * along with this program; if not, write to the Free Software
19   * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
20   *
21   */
22  
23  package org.talika.tarsis.security;
24  
25  import org.talika.tarsis.service.AbstractService;
26  
27  /**
28   * Base implementation of <code>Authenticator</code> interface.<br>
29   * <br>
30   * Authenticator plugs in system like a service by extending <code>AbstractService</code>.
31   *
32   * @author  Jose M. Palomar
33   * @version $Revision: 124 $
34   */
35  public abstract class AuthenticatorService extends AbstractService implements Authenticator {
36  
37      // Constants
38  
39      // Fields
40  
41      // Constructors
42      /**
43       * creates a new <code>AuthenticatorService</code>.
44       */
45      public AuthenticatorService() {
46      }
47  
48      // Methods
49      /**
50       * Checks if given user and password are correct.
51       *
52       * @param user String user name.
53       * @param password String user password.
54       * @return SecuritySession security session created from given user and password.
55       * @throws AuthenticationFailedException if user and/or password aren't correct.
56       * @see org.talika.tarsis.security.Authenticator#login(String, String)
57       */
58      public abstract SecuritySession login(String user, String password)
59      throws AuthenticationFailedException;
60  
61  }