Skip to end of metadata
Go to start of metadata

Form authentication allows you to index the HTML of your Sitecore items that can only be accessed while being authenticated. This method uses the credentials entered in the Coveo.SearchProvider.Custom.config, which are initially configured during the installation of the Coveo for Sitecore package, to log in.

Icon

The password is encrypted in the Coveo.SearchProvider.Custom.config file. To change the credentials, you should instead go to the Sitecore Control Panel, and under Coveo Search > Configuration, select Sitecore Credentials.

One of the use cases of this method is with the HtmlContentInBodyWithRequestsProcessor pipeline, which uses an Http Get request to fetch the content of a page at indexing time, and attempts a form authentication using the Post method when the page is secured.

To configure your processor to allow form authentication, follow these steps:

  1. Open the Coveo.SearchProvider.Custom.config file. It is usually located under <Sitecore Instance>\Website\App_Config\Include\Coveo.
  2. In the defaultIndexConfiguration node, add the following nodes:

  3. Enter the following information in the nodes:

    1. formsAuthLoginPage: the URL of your login page.
    2. formsAuthUserControl: the id of the username text field.
    3. formsAuthPasswordControl: the id of the password text field.

      Icon

      You can obtain the id of those fields by inspecting the logging page with your browser of choice.

    4. formsAuthLoginCommand: Enter the name of the button and its value, with the following syntax:

      Icon

      Spaces have to be replaced with the + symbol.

  4. Save and close the file.
  5. Rebuild your indexes (see Rebuilding Your Search Indexes).

 

Example:

You wish to index content from your http://www.secured.com Sitecore website. You can access the authentication page of the website through http://www.secured.com/sitecore/login.

In your Coveo.SearchProvider.Custom.config file, under defaultIndexConfiguration, you enter the following nodes:

 

 

  • No labels