01: /*
02: * Copyright 2003-2006 Rick Knowles <winstone-devel at lists sourceforge net>
03: * Distributed under the terms of either:
04: * - the common development and distribution license (CDDL), v1.0; or
05: * - the GNU Lesser General Public License, v2.1 or later
06: */
07: package winstone;
08:
09: /**
10: * Interface for authentication realms.
11: *
12: * @author <a href="mailto:rick_knowles@hotmail.com">Rick Knowles</a>
13: * @version $Id: AuthenticationRealm.java,v 1.3 2006/12/09 03:56:41 rickknowles Exp $
14: */
15: public interface AuthenticationRealm {
16: /**
17: * Authenticate the user - do we know them ? Return a distinct id once we
18: * know them. Used by the BASIC and FORM authentication methods.
19: */
20: public AuthenticationPrincipal authenticateByUsernamePassword(
21: String userName, String password);
22:
23: /**
24: * Retrieve an authenticated user. Used by the DIGEST and CLIENTCERT authentication methods.
25: */
26: public AuthenticationPrincipal retrieveUser(String userName);
27: }
|