Changeset 1309
- Timestamp:
- 04/15/19 09:19:39 (5 years ago)
- Location:
- trunk/src/org/expeditee
- Files:
-
- 3 added
- 14 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/assets/resources-public/framesets/multiuser/1.exp
r1264 r1309 1 V 1 491 V 168 2 2 U authadmin 3 3 D 04Jan2019[10:48] 4 M authadmin5 d 21Mar2019[12:22]4 M bryce 5 d 12Apr2019[16:52] 6 6 B 100 100 39 100 7 7 Z … … 18 18 m 0.0 19 19 h 0.0 20 p 40 20 21 21 22 S T 32 22 23 s 04Jan2019[10:51.59] 23 24 d 0 0 0 100 24 P 268 71 25 T Expeditee Desktop for: 26 o authadmin 27 v S 28 f Metamorphous_r51 29 t -1.0 30 b 0.0 31 m 0.0 32 h -1.0 33 p 40 34 35 S T 117 36 s 04Jan2019[11:00.49] 37 d 0 0 0 100 38 P 267 141 39 T authadmin 40 D txtUsername 41 o authadmin 42 v S 43 f Amaranth_r40 25 P 268 109 26 T Expeditee Multiuser Menu 27 o authadmin 28 v S 29 f Metamorphous_r50 44 30 t -1.0 45 31 b 0.0 … … 52 38 P 268 185 53 39 T “If Aphroditē be the godess of love, then let Expeditee be the godess of Getting Things Done” 54 D W30055 40 o authadmin 56 41 v S … … 67 52 P 613 204 68 53 T "Sleek like Aphroditē, Wise like Athēnâ." 69 D W30070 54 o authadmin 71 55 v S … … 91 75 p 40 92 76 93 S P 182 94 s 04Jan2019[11:04.30] 95 d 100 0 0 100 96 P 495 272 97 e 59 59 100 100 98 o Bryce 99 v S 77 S T 1277 78 s 12Apr2019[15:09.02] 79 G 100 100 0 100 80 P 81 277 81 T @i: exit.png 1.28 82 x F 83 o nobody 84 n F 85 v S 86 f tr25 87 t -1.0 88 b 0.0 89 m 0.0 90 M 435 91 h 1.0 92 p 40 93 94 S T 1252 95 s 12Apr2019[15:18.50] 96 G 100 100 0 100 97 P 300 278 98 T @i: mail.png 1.28 99 x F 100 o nobody 101 n F 102 v S 103 f tr25 104 t -1.0 105 b 0.0 106 m 0.0 107 M 435 108 h 1.0 109 p 40 110 111 S T 1307 112 s 12Apr2019[16:43.10] 113 P 537 284 114 T @i: managment.png 81 115 o nobody 116 v S 117 f tr18 118 t -1.0 119 b 0.0 120 m 0.0 100 121 h 0.0 101 l 186 189102 c 178 181103 104 S P 183105 s 04Jan2019[11:04.30]106 d 100 0 0 100107 P 25 272108 e 59 59 100 100109 o Bryce110 v S111 h 0.0112 l 186 187113 c 178 180114 115 S P 648116 s 18Feb2019[14:25.45]117 d 100 0 0 100118 P 976 272119 e 59 59 100 100120 o Bryce121 v S122 h 0.0123 l 652 655124 c 638 639125 126 S P 649127 s 18Feb2019[14:25.45]128 d 100 0 0 100129 P 506 272130 e 59 59 100 100131 o Bryce132 v S133 h 0.0134 l 652 653135 c 638 640136 137 S T 268138 s 04Jan2019[11:06.56]139 d 0 0 0 100140 P 33 318141 T Account Managment142 o authadmin143 v S144 f Amaranth_r40145 t -1.0146 b 0.0147 m 0.0148 h -1.0149 p 40150 151 S T 642152 s 18Feb2019[14:25.45]153 d 0 0 0 100154 P 514 318155 T Frameset Sharing156 o authadmin157 v S158 f Amaranth_r40159 t -1.0160 b 0.0161 m 0.0162 h -1.0163 122 p 40 164 123 165 124 S T 614 166 125 s 14Jan2019[13:48.42] 167 G 100 100 0 100 168 K 0 0 0 100 169 P 41 363 170 T Switch User 171 F authentication1 172 x F 173 o authadmin 174 n F 175 v S 176 f tr25 177 t -1.0 178 b 0.0 179 m 0.0 180 M 435 126 d 0 0 0 100 127 G 100 100 0 100 128 K 0 0 0 100 129 P 25 406 130 T Switch User 131 X AuthSwitchUser 132 x F 133 o authadmin 134 n F 135 v S 136 f tr25 137 t -1.0 138 b 0.0 139 m 0.0 140 M 200 141 h 1.0 142 p 41 143 144 S T 1124 145 s 12Apr2019[15:10.37] 146 d 0 0 0 100 147 G 100 100 0 100 148 K 0 0 0 100 149 P 246 406 150 T Check Mail 151 X ToggleBay 152 x F 153 o authadmin 154 n F 155 v S 156 f tr25 157 t -1.0 158 b 0.0 159 m 0.0 160 M 200 161 h 1.0 162 p 41 163 164 S T 519 165 s 04Jan2019[11:58.32] 166 d 0 0 0 100 167 G 100 100 0 100 168 K 0 0 0 100 169 P 469 406 170 T Change Password 171 F authentication3 172 o authadmin 173 n F 174 v S 175 f tr25 176 t -1.0 177 b 0.0 178 m 0.0 179 M 200 181 180 h 1.0 182 181 p 41 … … 184 183 S T 643 185 184 s 18Feb2019[14:25.45] 186 G 100 100 0 100 187 K 0 0 0 100 188 P 522 363 189 T Hand Out My Credentials 185 d 0 0 0 100 186 G 100 100 0 100 187 K 0 0 0 100 188 P 25 452 189 T Log Out 190 190 X AuthLogout 191 191 x F … … 197 197 b 0.0 198 198 m 0.0 199 M 435 200 h 1.0 201 p 41 202 203 S T 615 204 s 25Jan2019[10:36.19] 205 G 100 100 0 100 206 K 0 0 0 100 207 P 41 404 208 T Check My Expeditee Mail 209 X MailMode 210 x F 211 o authadmin 212 n F 213 v S 214 f tr25 215 t -1.0 216 b 0.0 217 m 0.0 218 M 435 219 h 1.0 220 p 41 221 222 S T 519 223 s 04Jan2019[11:58.32] 224 G 100 100 0 100 225 K 0 0 0 100 226 P 41 445 227 T Change My Password 228 F authentication3 229 o authadmin 230 n F 231 v S 232 f tr25 233 t -1.0 234 b 0.0 235 m 0.0 236 M 435 199 M 200 200 h 1.0 201 p 41 202 203 S T 1219 204 s 12Apr2019[15:19.02] 205 d 0 0 0 100 206 G 100 100 0 100 207 K 0 0 0 100 208 P 246 452 209 T Make Contact 210 X AuthMakeContact 211 x F 212 o authadmin 213 n F 214 v S 215 f tr25 216 t -1.0 217 b 0.0 218 m 0.0 219 M 200 237 220 h 1.0 238 221 p 41 … … 240 223 S T 595 241 224 s 04Jan2019[12:26.21] 242 G 100 100 0 100 243 K 0 0 0 100 244 P 41 486 245 T I Have Forgotten My Password 246 o authadmin 247 n F 248 v S 249 f tr25 250 t -1.0 251 b 0.0 252 m 0.0 253 M 435 254 h 1.0 255 p 41 256 257 S T 558 258 s 04Jan2019[12:00.52] 259 G 100 100 0 100 260 K 0 0 0 100 261 P 41 527 262 T Setup Password Recovery 225 d 0 0 0 100 226 G 100 100 0 100 227 K 0 0 0 100 228 P 469 452 229 T Forgot Password 230 o authadmin 231 n F 232 v S 233 f tr25 234 t -1.0 235 b 0.0 236 m 0.0 237 M 200 238 h 1.0 239 p 41 240 241 S T 1167 242 s 12Apr2019[15:15.03] 243 d 0 0 0 100 244 G 100 100 0 100 245 K 0 0 0 100 246 P 246 498 247 T Password Recovery 263 248 X AuthSetupPasswordRecovery 264 249 x F … … 270 255 b 0.0 271 256 m 0.0 272 M 435 273 h 1.0 274 p 41 275 276 S P 184 277 s 04Jan2019[11:04.30] 278 d 100 0 0 100 279 P 25 597 280 e 59 59 100 100 281 o Bryce 282 v S 283 h 0.0 284 l 187 188 285 c 180 179 286 287 S P 185 288 s 04Jan2019[11:04.30] 289 d 100 0 0 100 290 P 495 597 291 e 59 59 100 100 292 o Bryce 293 v S 294 h 0.0 295 l 189 188 296 c 181 179 297 298 S P 650 299 s 18Feb2019[14:25.45] 300 d 100 0 0 100 301 P 506 597 302 e 59 59 100 100 303 o Bryce 304 v S 305 h 0.0 306 l 653 654 307 c 640 641 308 309 S P 651 310 s 18Feb2019[14:25.45] 311 d 100 0 0 100 312 P 976 597 313 e 59 59 100 100 314 o Bryce 315 v S 316 h 0.0 317 l 655 654 318 c 639 641 319 320 Z 321 322 L 186 1 323 s 182 183 324 325 L 189 1 326 s 185 182 327 328 L 187 1 329 s 183 184 330 331 L 652 1 332 s 648 649 333 334 L 655 1 335 s 651 648 336 337 L 653 1 338 s 649 650 339 340 L 188 1 341 s 184 185 342 343 L 654 1 344 s 650 651 345 346 Z 347 348 C 178 3 349 s 182 183 350 351 C 181 2 352 s 185 182 353 354 C 180 2 355 s 183 184 356 357 C 638 3 358 s 648 649 359 360 C 639 2 361 s 651 648 362 363 C 640 2 364 s 649 650 365 366 C 179 3 367 s 184 185 368 369 C 641 3 370 s 650 651 371 372 Z 373 374 ActiveTime:00:54:54 375 DarkTime:01:17:57 376 24:43:756 739 117 Md 377 24:43:875 739 117 Rd 378 24:44:065 739 117 Ru 379 24:44:113 739 117 Mu 380 24:45:891 739 117 kF11 257 M 200 258 h 1.0 259 p 41 260 261 Z 262 263 Z 264 265 Z 266 267 ActiveTime:01:36:13 268 DarkTime:02:59:19 269 52:40:201 520 396 Ld 270 52:40:305 520 396 Rd 271 52:40:402 523 398 Lu 272 52:40:403 523 398 Ru 273 52:42:434 744 325 Md 274 52:42:563 744 325 Rd 275 52:42:745 744 325 Ru 276 52:42:785 744 325 Mu 277 52:44:802 589 386 Ld 278 52:44:882 589 386 Rd 279 52:45:065 589 386 Ru 280 52:45:088 589 386 Lu 281 52:54:009 747 313 Md 282 52:54:090 747 313 Rd 283 52:54:288 747 313 Ru 284 52:54:321 747 313 Mu -
trunk/src/org/expeditee/assets/resources-public/framesets/multiuser/frame.inf
r1264 r1309 1 multiuser1 61 multiuser1 -
trunk/src/org/expeditee/auth/Actions.java
r1304 r1309 10 10 import java.nio.file.StandardCopyOption; 11 11 import java.security.InvalidKeyException; 12 import java.security.KeyFactory;13 12 import java.security.KeyPair; 14 13 import java.security.KeyPairGenerator; 15 14 import java.security.KeyStoreException; 16 15 import java.security.NoSuchAlgorithmException; 17 import java.security.PrivateKey;18 16 import java.security.PublicKey; 19 17 import java.security.SecureRandom; 20 18 import java.security.cert.CertificateException; 21 19 import java.security.spec.InvalidKeySpecException; 22 import java.security.spec.PKCS8EncodedKeySpec;23 20 import java.sql.SQLException; 24 21 import java.text.ParseException; … … 49 46 import org.expeditee.auth.tags.Constants; 50 47 import org.expeditee.core.Colour; 51 import org.expeditee.gui.Browser;52 48 import org.expeditee.gui.DisplayController; 53 49 import org.expeditee.gui.Frame; … … 62 58 import org.expeditee.setting.Setting; 63 59 import org.expeditee.setting.TextSetting; 64 import org.expeditee.settings.Settings;65 60 import org.expeditee.settings.UserSettings; 66 61 import org.expeditee.settings.folders.FolderSettings; … … 497 492 System.out.println(message + "Done."); 498 493 } 499 500 /*501 * Function used to authenticate as a specified user (via function arguments).502 */503 private static void login(Map<AuthenticationTag, String> userdata) throws NoSuchAlgorithmException, KeyStoreException, FileNotFoundException, CertificateException, ClassNotFoundException, IOException, SQLException, InvalidKeySpecException, InvalidKeyException, NoSuchPaddingException, IllegalBlockSizeException, BadPaddingException, ParseException {504 String username = userdata.get(AuthenticationTag.Username);505 String password = userdata.get(AuthenticationTag.Password);506 507 if (username.equals(AuthenticatorBrowser.USER_NOBODY)) {508 return;509 }510 511 SecretKey personalKey = null;512 513 try {514 personalKey = AuthenticatorBrowser.getInstance().getSecretKey(username, password);515 } catch (Exception e) {516 // leave personalKey null517 }518 519 if (personalKey == null) {520 // Incorrect username and password521 MessageBay.errorMessage("The username + password combination was incorrect.");522 return;523 }524 525 // **** DB526 // Have not been able to test the following as auth + login not currently working527 // 'out of the box'528 529 // Currently causing a concurrent modification setting related to InputManager.distributeGesture (preGesture)530 531 // initialize Apollo532 // EcosystemManager.getMiscManager().runOnGIOThread(new BlockingRunnable() {533 // public void execute() {534 // ApolloSystem.initialize();535 // }536 // });537 538 Frame oneFrame = null;539 if (!username.equals(AuthenticatorBrowser.ADMINACCOUNT)) {540 // Load in and cache the profile frame using the personal key fetched from keystore.541 // Reset the personal key once finished so that setting parsing can correctly set it.542 FrameIO.ClearCache();543 Text personalKeyText = KeyList.PersonalKey.generateText();544 personalKeyText.setData(Base64.getEncoder().encodeToString(personalKey.getEncoded()));545 KeyList.PersonalKey.setSetting(personalKeyText);546 UserSettings.UserName.set(username);547 oneFrame = FrameIO.LoadProfile(username);548 for (int i = 1; i <= FrameIO.getLastNumber(username); i++) {549 Frame f = FrameIO.LoadFrame(oneFrame.getFramesetName() + i);550 if (f != null && f.getData() != null && f.getData().contains("MultiuserCredentials")) {551 AuthenticatorBrowser.CREDENTIALS_FRAME = f.getNumber();552 }553 }554 555 // Update default folders.556 UserSettings.setupDefaultFolders();557 558 // Parse the settings frame to update the settings datastructure.559 Text fakeLink = new Text("settings");560 fakeLink.setLink(oneFrame.getFramesetName() + "2");561 Settings.parseSettings(fakeLink);562 563 // Check mail564 MailBay.clear();565 AuthenticatorBrowser.getInstance().loadMailDatabase();566 Text keyItem = org.expeditee.settings.identity.secrets.KeyList.PrivateKey.get();567 if (keyItem.getData() != null) {568 String keyEncoded = keyItem.getData().get(0);569 byte[] keyBytes = Base64.getDecoder().decode(keyEncoded);570 PrivateKey key = KeyFactory.getInstance(AsymmetricAlgorithm).generatePrivate(new PKCS8EncodedKeySpec(keyBytes));571 List<MailEntry> mailForLoggingInUser = Mail.getEntries(UserSettings.UserName.get(), key);572 for (MailEntry mail: mailForLoggingInUser) {573 MailBay.addMessage(mail.timestamp, mail.message, mail.message2, mail.options);574 }575 }576 Path deadDropPath = Paths.get(FrameIO.DEAD_DROPS_PATH);577 for (File connectionDir: deadDropPath.toFile().listFiles()) {578 if (connectionDir.isDirectory()) {579 Path deaddropforcontactPath = Paths.get(connectionDir.getAbsolutePath());580 AuthenticatorBrowser.getInstance().updateLastReadMailTime(deaddropforcontactPath);581 }582 }583 584 } else {585 UserSettings.UserName.set(AuthenticatorBrowser.ADMINACCOUNT);586 oneFrame = FrameIO.LoadFrame("multiuser1");587 }588 589 Collection<Item> usernameFields = getByData(FrameIO.LoadFrame(Constants.FRAME_MULTIUSER1), "txtUsername");590 usernameFields.forEach(usernameField -> usernameField.setText(username));591 592 Frame requestedFrame = FrameIO.LoadFrame(Browser.getStartFrame());593 Frame homeFrame = FrameIO.LoadFrame("home1");594 Frame choice = requestedFrame != null ? requestedFrame : homeFrame != null ? homeFrame : oneFrame;595 DisplayController.setCurrentFrame(choice, false);596 }597 494 598 495 /*
Note:
See TracChangeset
for help on using the changeset viewer.