Changeset 1320 for trunk/src/org/expeditee/auth/account
- Timestamp:
- 04/16/19 16:06:37 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/auth/account/Authenticate.java
r1316 r1320 1 1 package org.expeditee.auth.account; 2 2 3 import java.io.File;4 3 import java.io.IOException; 5 import java.nio.file.Path;6 import java.nio.file.Paths;7 4 import java.security.InvalidKeyException; 8 5 import java.security.KeyFactory; … … 29 26 import org.expeditee.auth.AuthenticatorBrowser; 30 27 import org.expeditee.auth.Mail; 31 import org.expeditee.auth.Mail.MailEntry;32 28 import org.expeditee.auth.gui.MailBay; 33 29 import org.expeditee.auth.tags.AuthenticationTag; … … 107 103 byte[] keyBytes = Base64.getDecoder().decode(keyEncoded); 108 104 PrivateKey key = KeyFactory.getInstance(AsymmetricAlgorithm).generatePrivate(new PKCS8EncodedKeySpec(keyBytes)); 109 List<MailEntry> mailForLoggingInUser = Mail.getEntries(UserSettings.UserName.get(), key); 110 for (MailEntry mail: mailForLoggingInUser) { 111 MailBay.addMessage(mail.timestamp, mail.message, mail.message2, mail.options); 112 } 113 114 // Update last read files. 115 Path deadDropPath = Paths.get(FrameIO.DEAD_DROPS_PATH); 116 for (File connectionDir: deadDropPath.toFile().listFiles()) { 117 if (connectionDir.isDirectory()) { 118 Path deaddropforcontactPath = Paths.get(connectionDir.getAbsolutePath()); 119 AuthenticatorBrowser.getInstance().updateLastReadMailTime(deaddropforcontactPath); 120 } 121 } 105 org.expeditee.auth.Mail.checkMail(key); 122 106 } else { 123 107 res.additionalInfo.add("No private key present: your communication with other Expeditee users will be limited until this is resolved."); … … 163 147 return AuthenticationResult.SuccessLogout; 164 148 } 165 149 166 150 public enum AuthenticationResult { 167 151
Note:
See TracChangeset
for help on using the changeset viewer.