summaryrefslogtreecommitdiffstats
path: root/dozentenmodul/src/main/java/util/ShibbolethECP.java
diff options
context:
space:
mode:
Diffstat (limited to 'dozentenmodul/src/main/java/util/ShibbolethECP.java')
-rw-r--r--dozentenmodul/src/main/java/util/ShibbolethECP.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/dozentenmodul/src/main/java/util/ShibbolethECP.java b/dozentenmodul/src/main/java/util/ShibbolethECP.java
index f3e35400..67936906 100644
--- a/dozentenmodul/src/main/java/util/ShibbolethECP.java
+++ b/dozentenmodul/src/main/java/util/ShibbolethECP.java
@@ -12,6 +12,8 @@ import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.util.EntityUtils;
import org.apache.log4j.Logger;
+import org.openslx.bwlp.thrift.iface.AuthenticationError;
+import org.openslx.bwlp.thrift.iface.TAuthenticationException;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
@@ -98,9 +100,9 @@ public class ShibbolethECP {
* Password as String.
* @return
* true if login worked, false otherwise.
- * @throws ECPAuthenticationException
+ * @throws TAuthenticationException
*/
- public static ReturnCode doLogin(final String idpUrl, final String user, final String pass) throws ECPAuthenticationException {
+ public static ReturnCode doLogin(final String idpUrl, final String user, final String pass) throws TAuthenticationException {
// first lets do some sanity checks
if (BWLP_SP == null) {
@@ -132,7 +134,7 @@ public class ShibbolethECP {
auth.authenticate();
} catch (ECPAuthenticationException e) {
LOGGER.error("ECP Authentication Exception, see trace: ", e);
- throw e;
+ throw new TAuthenticationException(AuthenticationError.GENERIC_ERROR, "ECP client failed to authenticate.");
}
// here test again for the SPURL
HttpGet testSp = new HttpGet(BWLP_SP);