summaryrefslogtreecommitdiffstats
path: root/dozentenmodul/src/main/java/auth
diff options
context:
space:
mode:
authorJonathan Bauer2015-07-06 14:31:28 +0200
committerJonathan Bauer2015-07-06 14:31:28 +0200
commite270e212f3849b12e1a1d2e9f03a8243b1e9ecc7 (patch)
treeae34be79ebfea206718a71e0f72712776c9bcb6c /dozentenmodul/src/main/java/auth
parent[client] Add classes for caching of data fetched via thrift (diff)
downloadtutor-module-e270e212f3849b12e1a1d2e9f03a8243b1e9ecc7.tar.gz
tutor-module-e270e212f3849b12e1a1d2e9f03a8243b1e9ecc7.tar.xz
tutor-module-e270e212f3849b12e1a1d2e9f03a8243b1e9ecc7.zip
[client] reworked exceptions handling of BWIDM auth
Diffstat (limited to 'dozentenmodul/src/main/java/auth')
-rw-r--r--dozentenmodul/src/main/java/auth/BWIDMAuthenticator.java13
-rw-r--r--dozentenmodul/src/main/java/auth/BaseAuthenticator.java5
2 files changed, 6 insertions, 12 deletions
diff --git a/dozentenmodul/src/main/java/auth/BWIDMAuthenticator.java b/dozentenmodul/src/main/java/auth/BWIDMAuthenticator.java
index a5a99da7..e4da3cc3 100644
--- a/dozentenmodul/src/main/java/auth/BWIDMAuthenticator.java
+++ b/dozentenmodul/src/main/java/auth/BWIDMAuthenticator.java
@@ -2,13 +2,13 @@ package auth;
import org.apache.log4j.Logger;
import org.apache.thrift.TException;
+import org.openslx.bwlp.thrift.iface.TAuthenticationException;
import org.openslx.bwlp.thrift.iface.TInvalidTokenException;
import org.openslx.bwlp.thrift.iface.UserInfo;
import org.openslx.thrifthelper.ThriftManager;
import util.ShibbolethECP;
import util.ShibbolethECP.ReturnCode;
-import edu.kit.scc.dei.ecplean.ECPAuthenticationException;
/**
* @author Jonathan Bauer
@@ -35,16 +35,11 @@ public class BWIDMAuthenticator implements BaseAuthenticator {
@Override
public void login(String username, String password,
- AuthenticatorCallback callback) throws ECPAuthenticationException {
+ AuthenticatorCallback callback) throws TAuthenticationException {
// sanity check on the ecpUrl, should have been set
- ReturnCode ret;
- try {
- ret = ShibbolethECP.doLogin(this.ecpUrl, username, password);
- } catch (ECPAuthenticationException e) {
- LOGGER.error("Bad credentials, see trace: ", e);
- throw e;
- }
+ ReturnCode ret = ShibbolethECP.doLogin(this.ecpUrl, username, password);
+
if (ret == ReturnCode.NO_ERROR) {
UserInfo userInfo;
try {
diff --git a/dozentenmodul/src/main/java/auth/BaseAuthenticator.java b/dozentenmodul/src/main/java/auth/BaseAuthenticator.java
index bebbff02..d52c5343 100644
--- a/dozentenmodul/src/main/java/auth/BaseAuthenticator.java
+++ b/dozentenmodul/src/main/java/auth/BaseAuthenticator.java
@@ -1,9 +1,8 @@
package auth;
+import org.openslx.bwlp.thrift.iface.TAuthenticationException;
import org.openslx.bwlp.thrift.iface.UserInfo;
-import edu.kit.scc.dei.ecplean.ECPAuthenticationException;
-
/**
* @author Jonathan Bauer
*
@@ -27,5 +26,5 @@ public interface BaseAuthenticator {
* @param callback The callback function to be called after the login
* @throws ECPAuthenticationException
*/
- void login(String username, String password, AuthenticatorCallback callback) throws ECPAuthenticationException;
+ void login(String username, String password, AuthenticatorCallback callback) throws TAuthenticationException;
} \ No newline at end of file