ASP Classic

If you are using Classical ASP and want to integrate the MCImageManager product with your system. You can use the ExternalAuthenticator to share sessions between ASP and PHP/.NET. This might at first seem like a tricky task but the steps are pretty easy if you have basic ASP skills.

Please note that the website need to be setup to run .NET, so get that to work before you start with these steps.

Step by step instructions

  1. Enable the ExternalAuthenticator by setting the authenticator setting to ExternalAuthenticator.
  2. Copy the imagemanager/plugins/ExternalAuthenticator/auth_example.asp to your system and with a suiting name for example "yoursystem/auth_imagemanager.asp".
  3. Copy the imagemanager/plugins/ExternalAuthenticator/md5.asp file to the same directory for example "yoursystem/md5.asp".
  4. Edit the "yoursystem/auth_imagemanager.asp" file and change the SECRET_KEY to something unique and tricky.
  5. Modify the logic in the "yoursystem/auth_imagemanager.asp" to suit your needs. For example check your local ASP sessions etc. This is very simple if you know basic ASP.
  6. Open the imagemanager/Web.config file or imagemanager/config.php file in an editor.
  7. Change the ExternalAuthenticator.external_auth_url config option to match the URL to your auth_imagemanager.asp file for example "/yoursystem/auth_imagemanager.asp".
  8. Change the ExternalAuthenticator.secret_key config option so it matches the unique key you added into "yoursystem/auth_imagemanager.asp".
  9. Verify that the authentication works properly by logging in/out.

Remember that the ExternalAuthenticator sets up a local session so that one will not be automatically removed if you logout you need. So you might need to request a session destroy page.

PHP Config example

// ExternalAuthenticator config
$mcImageManagerConfig['ExternalAuthenticator.external_auth_url'] = "/yoursystem/auth_imagemanager.asp";
$mcImageManagerConfig['ExternalAuthenticator.secret_key'] = "someSecretKey";

ASP.NET Config example

First, add it to the plugins section.

<plugin class="Moxiecode.Manager.Plugins.ExternalAuthenticator" />

Then add the configuration values.

<!-- External authenticator -->
<add key="ExternalAuthenticator.external_auth_url" value="/yoursystem/auth_imagemanager.asp" />
<add key="ExternalAuthenticator.secret_key" value="someSecretKey" />