| 1 18 package freecs.auth; 19 20 import java.util.Properties ; 21 22 import freecs.core.User; 23 import freecs.interfaces.IRequest; 24 25 public class NoAuthentication extends AbstractAuthenticator { 26 private static NoAuthentication auth = null; 27 28 public NoAuthentication () { } 29 30 public void init (Properties props) throws Exception { } 31 public void shutdown () throws Exception { } 32 public void logoutUser (User u) throws Exception { } 33 34 public User loginUser (String username, String password, String cookie, IRequest request) throws Exception { 35 if (username == null) 36 return null; 37 username = username.trim(); 38 User u = new User (username, cookie); 39 u.isUnregistered = false; 40 return (u); 41 } 42 43 public User loginUser (User u, String username, String password, IRequest req) throws Exception { 44 return u; 45 } 46 47 } | Popular Tags |