docs: protected static User decode(int contextId, String encodedString, ExtensionAuthentication authenticationExtension) {
  		String[] pieces = encodedString.split(FIELD_SEPARATOR, -1);
  		User user = null;
  		try {
  			int id = Integer.parseInt(pieces[0]);
  			if (id >= ID_SOURCE)
  				ID_SOURCE = id + 1;
  			boolean enabled = pieces[1].equals("true");
  			String name = new String(Base64.decodeBase64(pieces[2]));
  			int authTypeId = Integer.parseInt(pieces[3]);
  			user = new User(contextId, name, id);
  			user.setEnabled(enabled);
  
  			AuthenticationCredentials cred = authenticationExtension
  					.getAuthenticationMethodTypeForIdentifier(authTypeId).createAuthenticationCredentials();
  			cred.decode(pieces[4]);
  			user.setAuthenticationCredentials(cred);
  		} catch (Exception ex) {
  			log.error("An error occured while decoding user from: " + encodedString, ex);
  			return null;
  		}
  		if (log.isDebugEnabled())
  			log.debug("Decoded user: " + user);
  		return user;
  	}