Authentication sample with embedded content

The embedded content sample shows how to use the IBM® Cognos® Analytics REST API to sign in a user and then display embedded content.

Procedure

  1. Copy the embedded_content folder from the <installation_location>\samples folder to the <installation_location>\webcontent folder.
  2. Open the \webcontent\embedded_content\preLoginSample.html file in a text editor, and locate the <select> element:
    <select size="1" name="namespace">
             <option value="CognosEx">CognosEx (Example)</option>
             <option value="LDAP">LDAP (Example)</option>
    </select>
  3. For any of the configured namespaces that you want to see as a selection in the login page, define the <option> element within the <select> element, using the following syntax:
    
    <option value="namespace_ID">namespace_name</option>

    The namespace_ID corresponds to the Namespace ID property, as defined for the namespace in Cognos Configuration, under Security > Authentication. The namespace_name can be any word; however, the name defined in Cognos Configuration is preferred.

  4. Open the \webcontent\embedded_content\iFrameSample.html file, and replace the iFrame objects with Embed iFrame objects from your Cognos Analytics installation.
  5. In a web browser, type http://<server_name>:<port>/embedded_content/preLoginSample.html

Results

A sign-in web page is displayed. After you sign in, the embedded content objects are shown.