src/com/vehiclerental/presentationLayer/headOffice/protocolContracts/HeadOfficeRequestMessage.java
/**
     * Decodes the simple auth string and assigns the correct values to the password and email variables
     */
Decodes the simple auth string and assigns the correct values to the password and email variables
Decodes the simple auth string and assigns the correct values to the password and email variables
private void decodeSimpleAuth() {
        try {
            String decoded = new String(DatatypeConverter.parseBase64Binary(BasicAuth), StandardCharsets.UTF_8);
            String[] values = decoded.split(":");
            authEmail = values[0];
            authPassword = values[1];
        } catch (Exception e) {
            System.out.println("Invalid authentication parameters");
        }
    }
private void decodeSimpleAuth ( ) { try { String decoded = new String ( DatatypeConverter . parseBase64Binary ( BasicAuth ) , StandardCharsets . UTF_8 ) ; String [ ] values = decoded . split ( ":" ) ; authEmail = values [ 0 ] ; authPassword = values [ 1 ] ; } catch ( Exception e ) { System . out . println ( "Invalid authentication parameters" ) ; } }
Decodes the simple auth string and assigns the correct values to the password and email variables
Decodes the simple auth string and assigns the correct values to the password and email variables