Changeset 1363 for trunk/src/org/expeditee/auth/account/Authenticate.java
- Timestamp:
- 05/17/19 14:37:12 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/auth/account/Authenticate.java
r1359 r1363 25 25 import org.expeditee.auth.Actions; 26 26 import org.expeditee.auth.AuthenticatorBrowser; 27 import org.expeditee.auth. gui.MailBay;27 import org.expeditee.auth.mail.gui.MailBay; 28 28 import org.expeditee.auth.tags.AuthenticationTag; 29 29 import org.expeditee.gui.Browser; … … 41 41 public class Authenticate implements CryptographyConstants { 42 42 43 /** 44 * Given a username and password, potentially login. 45 * @param userdata 46 * @return AuthenticationResult.SuccessLogin if login works, AuthenticationResult.ErrorLoginNobody or AuthenticationResult.ErrorLoginUsernamePasswordCombo otherwise. 47 */ 43 48 public static AuthenticationResult login(Map<AuthenticationTag, String> userdata) { 44 49 String username = userdata.get(AuthenticationTag.Username); … … 76 81 if(data != null && data.contains("MultiuserCredentials")) { 77 82 AuthenticatorBrowser.CREDENTIALS_FRAME = f.getNumber(); 83 } else if (data != null && data.contains("PasswordColleagues")) { 84 AuthenticatorBrowser.PASSWORD_RECOVERY_FRAME = f.getNumber(); 85 } else if (data != null && data.contains("SecretsFrame")) { 86 AuthenticatorBrowser.SECRETS_FRAME = f.getNumber(); 78 87 } 79 }88 } 80 89 } 81 90 … … 103 112 byte[] keyBytes = Base64.getDecoder().decode(keyEncoded); 104 113 PrivateKey key = KeyFactory.getInstance(AsymmetricAlgorithm).generatePrivate(new PKCS8EncodedKeySpec(keyBytes)); 105 org.expeditee.auth. Mail.checkMail(key);114 org.expeditee.auth.mail.Mail.checkMail(key); 106 115 } else { 107 116 res.additionalInfo.add("No private key present: your communication with other Expeditee users will be limited until this is resolved."); … … 129 138 } 130 139 140 /** 141 * Logs out the current authenticated user. 142 * @return AuthenticationResult.SuccessLogout to signal the logout has occured. 143 */ 131 144 public static AuthenticationResult logout() { 132 145 // Set user to nobody.
Note:
See TracChangeset
for help on using the changeset viewer.