Web file manager Free Installation assistance Manual Home page

Integration with Content Management Systems

HTTP Commander can be configured to use an account database of a CMS for authentication. That means that you will be able to use your account in a CMS to log into the HTTP Commander. Once logged into a CMS you'll be automatically authenticated in the HTTP Commander, provided that you've opened it through a special link in the CMS.

How it works

When you enter your user name and password into HTTP Commander login form, HTTP Commander sends an Http request with your name and password (or password hash) to an account-check page in the CMS. The CMS verifies the data and replies with either "yes" or "no". HTTP Commander reads the response and authenticates you if the response is positive.

If you are logged into CMS, there is a link to HTTP Commander with embedded information about your account. The link includes your user name and password hash. When you follow this link, HTTP Commander receives your account information. HTTP Commander sends an Http request back to the CMS to verify data. If verification succeeds, you are logged into HTTP Commander under the account you have in the CMS.

HTTP Commander can be integrated with the following CMSs: Drupal, Joomla, WordPress.

In order to integrate HTTP Commander with a CMS you need to
1) configure HTTP Commander to use a CMS for authentication;
2) configure the CMS to provide a link to HTTP Commander and verify account information.

Configuring HTTP Commander

To use an account database of a CMS for authentication, you need to edit the Default.aspx and \App_Code\ExternalCMSIntegration.cs files in the HTTP Commander root directory.

  1. Uncomment {CMS name}URL constant and assign a correct URL.

    const string {CMS name}URL = "http://win2008-mws/{CMS name}/account-check.php";
    
  2. In the Page_Load function uncomments the "automatic logon from CMS" block:

        // automatic logon from CMS
        if (Request.QueryString["username"] != null && Request.QueryString["passwordhash"] != null)
        {
            string userName = Request.QueryString["username"].ToString();
            string passwordHash = Request.QueryString["passwordhash"].ToString();
            //if (ExternalCMSIntegration.ValidateUserPasswordHashDrupal(userName, passwordHash))
            //if (ExternalCMSIntegration.ValidateUserPasswordHashJoomla(userName, passwordHash))
            //if (ExternalCMSIntegration.ValidateUserPasswordHashWordPress(userName, passwordHash))
            {
                FormsAuthentication.SetAuthCookie(userName, false);
                RenderMainBody(userName);
                Log.OnLogin(userName);
                if (Request.QueryString["ReturnUrl"] != null)
                {
                    string ReturnUrl = Request.QueryString["ReturnUrl"];
                    Response.Redirect(ReturnUrl);
                }
                return;
            }
        }
    
  3. In the btnLogin_Click handler, comment the ValidateUser call:

        bool validated = Utils.AccountsManager.ValidateUser(txtUserName.Text, txtPassword.Text);
    

    and uncomment:

        bool validated = ExternalCMSIntegration.ValidateUserPassword{CMS name}(txtUserName.Text, txtPassword.Text);
    

Configuring Drupal

  1. Open CMS-Files folder inside documentation root. Copy the files from the drupal folder into the Drupal root folder. The account-check.php file should be in the root folder now.
  2. Open the sites\all\modules\htcom\htcom.module file in a text editor and specify the URL to HTTP Commander in the htcom_block function.
  3. Log into Drupal as administrator.
  4. Enable HttpCommander module (Administer->Site building->Modules).
  5. Drag and drop HTTP Commander block on a sidebar (Administer->Site building->Blocks).

Now you'll be able to see the link to HTTP Commander on every page having that sidebar.

Screenshot

Configuring Joomla

  1. Open CMS-Files folder inside documentation root. Copy the files from the joomla/files folder into the Joomla root folder. The account-check.php file should be in the root folder now.
  2. Open mod_htcom.zip\mod_htcom\mod_htcom.php file in a text editor and specify the URL to HTTP Commander.
  3. Open your Joomla admin area.
  4. Open Extension Manager (Main menu->Extension->Install/Uninstall).
  5. In the Upload Package File section click Browse and find the mod_htcom.zip archive. Click Upload file & install button.
  6. The "Install Module Success" message confirms that the module has been installed successfully.
  7. Open Module Manager (Main menu->Extensions->Module manager).
  8. Enable HTTP Commander module. Here you can configure module position (by default it appears on the left panel) and other parameters.
  9. Leave the admin area and log into Joomla as a normal user.

Now you'll be able to see the link to HTTP Commander on the left side of the page.

Screenshot

Configuring WordPress

  1. Open CMS-Files folder inside documentation root. Copy the files from the wordpress folder into the WordPress root folder. The account-check.php file should be in the root folder now.
  2. Open the wp-content\plugins\htcom.php file in a text editor and specify the URL to HTTP Commander in the htcom_link function.
  3. Log into WordPress as administrator.
  4. Activate the HTTP Commander plugin (Site Admin->Plugins).
  5. Open Widgets module (Site Admin->Appearance->Widgets).
  6. Expand Primary Widget Area (or any other area where you want to place the HTTP Commander link).
  7. Drag and drop the HTTP Commander widget into the expanded area.
  8. Leave the Site admin area and open, for example, the start page.

Now you'll be able to see the link to HTTP Commander.

Screenshot