diff options
Diffstat (limited to 'dozentenmodul/src/main/java/auth/BaseAuthenticator.java')
-rw-r--r-- | dozentenmodul/src/main/java/auth/BaseAuthenticator.java | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/dozentenmodul/src/main/java/auth/BaseAuthenticator.java b/dozentenmodul/src/main/java/auth/BaseAuthenticator.java new file mode 100644 index 00000000..bebbff02 --- /dev/null +++ b/dozentenmodul/src/main/java/auth/BaseAuthenticator.java @@ -0,0 +1,31 @@ +package auth; + +import org.openslx.bwlp.thrift.iface.UserInfo; + +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(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 ECPAuthenticationException; +}
\ No newline at end of file |