diff options
| author | Nino Breuer | 2014-11-20 18:09:22 +0100 |
|---|---|---|
| committer | Nino Breuer | 2014-11-20 18:09:22 +0100 |
| commit | 2f6f2e6380f747f6b21ff60f8e12b7441bce4a55 (patch) | |
| tree | 7c6d9f80dc87d8cc7efff787bf751191f6f6998f /dozentenmodulserver/src/main/java/sql | |
| parent | • client-authentication (diff) | |
| download | tutor-module-2f6f2e6380f747f6b21ff60f8e12b7441bce4a55.tar.gz tutor-module-2f6f2e6380f747f6b21ff60f8e12b7441bce4a55.tar.xz tutor-module-2f6f2e6380f747f6b21ff60f8e12b7441bce4a55.zip | |
• authentication
Diffstat (limited to 'dozentenmodulserver/src/main/java/sql')
| -rw-r--r-- | dozentenmodulserver/src/main/java/sql/SQL.java | 36 |
1 files changed, 3 insertions, 33 deletions
diff --git a/dozentenmodulserver/src/main/java/sql/SQL.java b/dozentenmodulserver/src/main/java/sql/SQL.java index 9cee34e1..db23a90a 100644 --- a/dozentenmodulserver/src/main/java/sql/SQL.java +++ b/dozentenmodulserver/src/main/java/sql/SQL.java @@ -14,10 +14,6 @@ import java.util.HashMap; import java.util.List;
import java.util.Map;
import java.util.UUID;
-
-import org.openslx.imagemaster.thrift.iface.ImageServer.Client;
-import org.openslx.imagemaster.thrift.iface.InvalidTokenException;
-
//import server.generated.Server.Client;
@@ -30,39 +26,13 @@ import server.BinaryListener; import server.generated.Image;
import server.generated.Lecture;
import server.generated.Person;
-import thrift.MasterThriftConnection;
-import thrift.SessionData;
+
public class SQL {
private static Logger log = Logger.getLogger(BinaryListener.class);
- Client client = null;
-
-
- public void setTokenForSession(String token)
- {
- SessionData.session.setAuthToken(token);
- }
-
-
- public boolean authenticated() throws InvalidTokenException
- {
- MasterThriftConnection thrift = new MasterThriftConnection();
- client = thrift.getMasterThriftConnection();
- try {
- if(client.getUserFromToken(SessionData.session.getAuthToken()) != null)
- {
- return true;
- }
- } catch (TException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- return false;
- }
-
-
+
public Connection getConnection() {
try {
@@ -852,7 +822,7 @@ public class SQL { //No prepared statement to do here
- public List<String> getAllOS() throws InvalidTokenException
+ public List<String> getAllOS()
{
//if(authenticated())
|
