private function _initializeProfile($userProfile) {
        die(print_r($userProfile));
        //validate that user profile has the correct information for password validation
        if (!is_array($userProfile)
            || !isset($userProfile['username'])
            || !isset($userProfile['password'])
            || !isset($userProfile['fullname'])			
            || !isset($userProfile['passhash'])
            || !is_string($userProfile['passhash'])
            || !isset($userProfile['passhist'])
            || !is_array($userProfile['passhist'])
            || !isset($userProfile['account_state'])
            || !isset($userProfile['policyinfo'])
            || !is_array($userProfile['policyinfo'])
            || !is_array($userProfile['platforminfo'])
        ) {
            throw new UserCredentialException('The user profile is not properly initialized', 1000);
        }
        
        //validate tenancy is a datetime
        if (array_key_exists('tenancy_expiry', $userProfile['policyinfo'])) {
            $tenancyExpiry = $userProfile['policyinfo']['tenancy_expiry'];
            
            if (($tenancyExpiry instanceof \DateTime) === false) {
                throw new UserCredentialException('The user profile is not properly initialized', 1000);
            }
        }
        
        //set a blank TOTP profile if not set
        if (!isset($userProfile['totpinfo'])) {
            $userProfile['totpinfo'] = array();
        }
        
        $this->_userProfile = $userProfile;
    }