3. Bind the Single Sign On service to the application

  1. Bind the Single Sign On service with the configured identity source to your application. Click Apps > Cloud Foundry Apps.
  2. Click the application icon in the App listing to open the application overview page. Then, click Connect existing from the Connections panel.
  3. Select your Single sign on service and confirm by clicking Connect.

    You will be prompted to restage the application. A restage is used to add the VCAP_SERVICES environment variables to the application so that it will be able to access the Single Sign On service bound to the application.

  4. Click Restage.
    The restaging and restarting of the application will complete quickly. However, you do not need to wait before proceeding.

    After the restage, you will be in the Connections panel for the application.

  5. Click the Single Sign On service item to open the configuration window for the service in the context of this application.
    When you access the configuration window from within an application, an INTEGRATE tab will also be shown.

  6. Click INTEGRATE to show the Application Configuration panel where you will add the callback URL for our application after a login attempt has been completed.
  7. Enter in the Callback URL for the SSO service to invoke after the authentication is completed in the Return-to URL box. The host part of this Callback URL must match the host name that you specified when you created the application. The rest of the host name should be the default Bluemix domain. Complete the URL with the route /auth/sso/callback. Also, update the code for this route in the Node.js starter application. In the examples shown in this lab, this is the correct URL:
    https://ssolab-20161207tor.mybluemix.net/auth/sso/callback
  8. Optional: Change the display name for the application from the default. This is the name used by the SSO service when prompting a user for consent to allow the retrieval of personal information from the identity source. After you enter the callback URL and update the display name (optional), click Save.
  9. Click OK in the Configuration Application confirmation. You can click your application name at the top of the Single Sign On control panel to the application control panel.
    Next, you’ll update the application source code to use the service.