diff options
Diffstat (limited to 'dozentenmodul/src/main/java/gui/intro/Login_GUI.java')
-rw-r--r-- | dozentenmodul/src/main/java/gui/intro/Login_GUI.java | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/dozentenmodul/src/main/java/gui/intro/Login_GUI.java b/dozentenmodul/src/main/java/gui/intro/Login_GUI.java index 17de8772..b875fb58 100644 --- a/dozentenmodul/src/main/java/gui/intro/Login_GUI.java +++ b/dozentenmodul/src/main/java/gui/intro/Login_GUI.java @@ -98,6 +98,7 @@ public class Login_GUI extends JFrame { addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent e) { + System.exit(0); } }); @@ -323,6 +324,7 @@ public class Login_GUI extends JFrame { LOGGER.info("Authentifizierung von '" + lblusername.getText() + "' erfolgreich."); user = client.getUserFromToken(result.authToken); authToken = result.authToken; + } catch (org.openslx.imagemaster.thrift.iface.AuthenticationException e) { setStatus( @@ -463,23 +465,28 @@ public class Login_GUI extends JFrame { server.generated.Server.Client client_2 = models.Client.clientcon.getClient(); try { - client_2.setTokenForSession(authToken); + boolean authenticated = client_2.authenticated(authToken); + + if(!authenticated) + { + //TODO message for user and deactivation of menu points, actually just system exit + System.exit(0); + } } catch (TException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } try { - String pk_institution = client_2.setInstitution(person.verantwortlicher.getHochschule()); + String pk_institution = client_2.setInstitution(person.verantwortlicher.getHochschule(),SessionData.session.getAuthToken()); //LOGGER.info("Institution of user is: "+pk_institution); - client_2.setPerson(person.verantwortlicher.getUserID(), person.verantwortlicher.getName(), person.verantwortlicher.getVorname(), person.verantwortlicher.getEMail(), pk_institution); + client_2.setPerson(person.verantwortlicher.getUserID(),SessionData.session.getAuthToken(),pk_institution); //LOGGER.info("user data, ID="+person.verantwortlicher.getUserID()+" , Name="+person.verantwortlicher.getName()+" , Vorname="+ person.verantwortlicher.getVorname()+" , E-Mail="+ person.verantwortlicher.getEMail()+" , Institution="+ pk_institution); } catch (TException e) { // TODO Auto-generated catch block e.printStackTrace(); } - // Pruefe ob Bills Of Rights schon akzeptiert wurden, // wenn nicht zeige diese an if (!Config.getBillOfRights()) { |