01: /*
02:
03: This software is OSI Certified Open Source Software.
04: OSI Certified is a certification mark of the Open Source Initiative.
05:
06: The license (Mozilla version 1.0) can be read at the MMBase site.
07: See http://www.MMBase.org/license
08:
09: */
10:
11: package org.mmbase.security.implementation.basic;
12:
13: import java.util.Map;
14:
15: import org.mmbase.util.logging.Logger;
16: import org.mmbase.util.logging.Logging;
17:
18: /**
19: * Class AnonymousLoginModule
20: * @javadoc
21: * @author Eduard Witteveen
22: * @version $Id: AnonymousLoginModule.java,v 1.8 2008/01/10 14:12:24 michiel Exp $
23: */
24:
25: public class AnonymousLoginModule implements LoginModule {
26: private static final Logger log = Logging
27: .getLoggerInstance(AnonymousLoginModule.class);
28:
29: public void load(Map<String, Object> properties) {
30: // nah do nothing..
31: }
32:
33: public boolean login(NameContext user,
34: Map<String, Object> loginInfo, Object[] parameters) {
35: log.debug("anonymous login..");
36: // set the identifier...
37: user.setIdentifier("anonymous");
38: return true;
39: }
40: }
|