Ignore:
Timestamp:
05/17/19 14:37:12 (5 years ago)
Author:
bln4
Message:

It is now possible to complete the process of recovering access to a Expeditee account. Further work, in the form of frames in the authentication frameset, are to follow.
A refactoring/tidy up has also been completed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/auth/account/Authenticate.java

    r1359 r1363  
    2525import org.expeditee.auth.Actions;
    2626import org.expeditee.auth.AuthenticatorBrowser;
    27 import org.expeditee.auth.gui.MailBay;
     27import org.expeditee.auth.mail.gui.MailBay;
    2828import org.expeditee.auth.tags.AuthenticationTag;
    2929import org.expeditee.gui.Browser;
     
    4141public class Authenticate implements CryptographyConstants {
    4242
     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         */
    4348        public static AuthenticationResult login(Map<AuthenticationTag, String> userdata) {
    4449                String username = userdata.get(AuthenticationTag.Username);
     
    7681                                        if(data != null && data.contains("MultiuserCredentials")) {
    7782                                                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();
    7887                                        }
    79                                 }
     88                                }
    8089                        }
    8190                       
     
    103112                                        byte[] keyBytes = Base64.getDecoder().decode(keyEncoded);
    104113                                        PrivateKey key = KeyFactory.getInstance(AsymmetricAlgorithm).generatePrivate(new PKCS8EncodedKeySpec(keyBytes));
    105                                         org.expeditee.auth.Mail.checkMail(key);
     114                                        org.expeditee.auth.mail.Mail.checkMail(key);
    106115                                } else {
    107116                                        res.additionalInfo.add("No private key present: your communication with other Expeditee users will be limited until this is resolved.");
     
    129138        }
    130139       
     140        /**
     141         * Logs out the current authenticated user.
     142         * @return AuthenticationResult.SuccessLogout to signal the logout has occured.
     143         */
    131144        public static AuthenticationResult logout() {
    132145                // Set user to nobody.
Note: See TracChangeset for help on using the changeset viewer.