Registering the mobile client

Follow these steps to register the Connections Mobile client.

Procedure

  1. Load WebSphere Application Server administration using wsadmin. Replace the -user and -password values with your environment's WebSphere Application Server admin credentials.
    ./wsadmin.sh -lang jython -user wasadmin -password password
  2. Load the OAuth admin commands.
    execfile('oauthAdmin.py')
  3. Register the Connections Mobile Server application.
    OAuthApplicationRegistrationService.addApplication("connections_social_mobile", "Connections Mobile", "com.ibm.ibmscp://com.ibm.mobile.connections/token")
  4. Review the list of registered applications to ensure registration was successful.
    OAuthApplicationRegistrationService.browseApplications()
  5. Connections Mobile is a public OAuth client and public clients are not enabled by default in the WebSphere Connections Provider definition file. To enable public OAuth clients, modify the connectionsProvider.xml. (located, for example, in \HCL\WebSphere\AppServer\profiles\DMgr01\config\cells\nameCell01\oauth20\) that is used to configure the provider. Locate the parameter named oauth20.allow.public.clients and change the value from false to true. For example:
    <parameter name="oauth20.allow.public.clients" type="cc" customizable="true">
     <value>true</value>
    </parameter>
  6. Once the connectionsProvider.xml is updated, recreate the OAuth Provider using the following command. Ensure that the filename references the location of your connectionsProvider.xml. Ensure the user and password parameters matches your actual WebSphere Application Server administrator credentials.
    ./wsadmin.sh -lang jython -conntype SOAP -c "print AdminTask.createOAuthProvider('[-providerName  connectionsProvider -fileName  /opt/IBM/WebSphere/AppServer/profiles/Dmgr01/config/cells/nameCell01/oauth20/connectionsProvider.xml]')" -user wasadmin -password password
  7. Restart WebSphere Application Server to pick up the new changes.