diff options
| author | Jonathan Bauer | 2015-07-06 14:31:28 +0200 |
|---|---|---|
| committer | Jonathan Bauer | 2015-07-06 14:31:28 +0200 |
| commit | e270e212f3849b12e1a1d2e9f03a8243b1e9ecc7 (patch) | |
| tree | ae34be79ebfea206718a71e0f72712776c9bcb6c /dozentenmodul/src/main/java/auth/BWIDMAuthenticator.java | |
| parent | [client] Add classes for caching of data fetched via thrift (diff) | |
| download | tutor-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/BWIDMAuthenticator.java')
| -rw-r--r-- | dozentenmodul/src/main/java/auth/BWIDMAuthenticator.java | 13 |
1 files changed, 4 insertions, 9 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 { |
