/* * Passive LoginModule for use with the LONI Pipeline server * Copyright (C) 2007 Laboratory of Neuro Imaging @ UCLA * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * Written by Arash Payan * apayan@loni.ucla.edu */ /* * PassiveLoginModule.java * * Created on April 25, 2007, 3:16 PM */ package edu.ucla.loni.pipeline.security; import java.util.Map; import javax.security.auth.Subject; import javax.security.auth.callback.CallbackHandler; import javax.security.auth.login.LoginException; import javax.security.auth.spi.LoginModule; /** * WARNING: Do NOT use this class on a production server that will be exposed to the * outside world. It will allow anybody with a Pipeline client to access your server. * This LoginModule should only be used for testing purposes or on * servers where only trusted people have network access to it. * * This is a dummy LoginModule implementation that will accept any * set of user credentials. The class doesn't even make any calls to the * CallbackHandler that is provided during initialize(). * @author Arash Payan */ public class PassiveLoginModule implements LoginModule { /** Creates a new instance of PassiveLoginModule */ public PassiveLoginModule() { } /** * refer to the JavaDocs of LoginModule for a proper description * @param subject refer to the JavaDocs of LoginModule for a proper description * @param handler refer to the JavaDocs of LoginModule for a proper description * @param sharedState refer to the JavaDocs of LoginModule for a proper description * @param options refer to the JavaDocs of LoginModule for a proper description */ public void initialize(Subject subject, CallbackHandler handler, Map sharedState, Map options) { } /** * refer to the JavaDocs of LoginModule for a proper description * @throws javax.security.auth.login.LoginException This will never get thrown by this implementation * @return true */ public boolean login() throws LoginException { return true; } /** * refer to the JavaDocs of LoginModule for a proper description * @throws javax.security.auth.login.LoginException This will never get thrown by this implementation * @return true */ public boolean commit() throws LoginException { return true; } /** * refer to the JavaDocs of LoginModule for a proper description * @throws javax.security.auth.login.LoginException this will never get thrown by this implementation * @return true */ public boolean abort() throws LoginException { return true; } /** * refer to the JavaDocs of LoginModule for a proper description * @throws javax.security.auth.login.LoginException This will never get thrown by this implementation * @return true */ public boolean logout() throws LoginException { return true; } }