Registering the mobile client
Follow these steps to register the Connections Mobile client.
Procedure
-
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
-
Load the OAuth admin commands.
execfile('oauthAdmin.py')
-
Register the Connections Mobile Server application.
OAuthApplicationRegistrationService.addApplication("connections_social_mobile", "Connections Mobile", "com.ibm.ibmscp://com.ibm.mobile.connections/token")
-
Review the list of registered applications to ensure registration was successful.
OAuthApplicationRegistrationService.browseApplications()
-
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 fromfalse
totrue
. For example:<parameter name="oauth20.allow.public.clients" type="cc" customizable="true"> <value>true</value> </parameter>
-
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
- Restart WebSphere Application Server to pick up the new changes.