01: /*
02: * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
03: * PROPRIETARY/CONFIDENTIAL. Use of this product is subject to license terms.
04: */
05:
06: package com.sun.portal.search.db;
07:
08: import com.sun.portal.search.rdm.RDMRequest;
09:
10: /**
11: * An interface for implement an authenticationn module.
12: * RDMSecurityManager will contain only one authenticcation module which used to
13: * authenticate user of a request.
14: */
15: public interface RDMAuthenticationModule {
16: /**
17: * Obtain a SToken object via the external request object or RDMRequest.
18: * This function has to set the SToken in the RDMRequest if the token is created
19: * by using req.setSToken(st)
20: * @param request An external request, such as httpRequest.
21: * @param req A RDMRequest object
22: * @return true - if the SToken was obtained successfully.
23: * @throws java.lang.Exception Any Exception during the SToken creation.
24: */
25: public boolean initRDMSToken(Object request, RDMRequest req)
26: throws Exception;
27:
28: /**
29: * getting the SecurityModules defined within this module.
30: * Each Authentication module could have its predefined security modules
31: * @return A list of security modules predefined with the authentication module.
32: */
33: public DatabaseSecurityModule[] getAssociatedSecurityModules();
34:
35: /**
36: * The default security module for this authentication module.
37: * This will be used if the database doesn't defined its security module.
38: * @return A default security module.
39: */
40: public String getDefaultDatabaseSecurityModuleName();
41:
42: /**
43: * Checking current use administration privilege.
44: * Consumed by security module to perform an administration request.
45: * @param stoken SToken of current request
46: * @throws java.lang.Exception Error
47: * @return true - if the request carries administration privilege.
48: */
49: public boolean isPrivilegedUser(SToken stoken) throws Exception;
50: }
|