Registering an OAuth application with a provider

Register OAuth - In order for Actitivites Plus to authenticate with your Connections environment, you must define a new OAuth widget.

Procedure

  1. SSH to the HCL Connections Deployment Manager (substitute the alias):

    ssh root@[DEPLOY_MANAGER_ALIAS]

  2. On the WebSphere® deployment manager machine, start the wsadmin client, substituting your credentials. For more information, see Starting the wsadmin client.
  3. Register the new application definition:
    execfile('oauthAdmin.py')
    OAuthApplicationRegistrationService.addApplication('kudosboards', 'Kudos Boards', 'https://[BOARDS_URL]/auth/connections/callback')

    where [BOARDS_URL] is your Connections URL for Activities Plus, for example, connections.example.com/boards.

  4. Use this command to view and record the definition of the unique clientSecret:
    OAuthApplicationRegistrationService.getApplicationById('kudosboards')
    

    The clientSecret will be used later as follows:

    CONNECTIONS_URL=https://connections.example.com
    CONNECTIONS_CLIENT_ID=kudosboards
    CONNECTIONS_CLIENT_SEC
  5. Enable auto-authorization for this application by specifying the provider to make it a privileged client.
    Note: This step is optional but recommended and can be done at any time.
    1. Add a line for this provider in connectionsProvider.xml, which is used to configure the provider to add the appId previously used to the trusted auto-auth client list. The file is located in [PATH_TO_CONFIG_FILE]/oauth20/) where [PATH_TO_CONFIG_FILE] is WAS_HOME/profiles/<dmgr_profile_name>/config/[cellname].
      <parameter name="oauth20.autoauthorize.clients" type="ws" customizable="true">
              <value>kudosboards</value>
            </parameter>
      Note: Keep any existing provider values.
    2. Recreate the provider using this wsadmin command, substituting the appropriate path for connectionsProvider.xml and updating the wasadmin credentials to those shown here:
      ./wsadmin.sh -lang jython -conntype SOAP -c "print AdminTask.createOAuthProvider('[-providerName connectionsProvider -fileName [PATH_TO_CONFIG_FILE]/oath20/connectionsProvider.xml]')" -user connectionsadmin -password passw0rd