package auth; import org.openslx.bwlp.thrift.iface.TAuthenticationException; import org.openslx.bwlp.thrift.iface.UserInfo; import util.ShibbolethECP.ReturnCode; import edu.kit.scc.dei.ecplean.ECPAuthenticationException; /** * @author Jonathan Bauer * */ public interface BaseAuthenticator { /** * Callback interface to the login to be called after a login * Note that this will be called after every login, independent * of the success of the operation. This way the GUI can show a * corresponding message to the user. */ interface AuthenticatorCallback { void postLogin(ReturnCode returnCode, UserInfo user); } /** * Definition of the generic login method. * * @param username The username as String. * @param password The password as String. * @param callback The callback function to be called after the login * @throws ECPAuthenticationException */ void login(String username, String password, AuthenticatorCallback callback) throws TAuthenticationException; }