Manage the client application list
Use commands to manage the list of client applications allowed to prompt users for access to their IBM Connections data, using the OAuth authentication protocol.
See the topic Running administrative commands for steps on executing oauthAdmin.py before running OAuth commands in Connections.
Perform any of the following tasks using the appropriate command:
- Add client applications to the consumer list
- Edit client application information
- View all client applications
- View one client application
- Counting client applications
- Delete client applications
Add client applications to the consumer list
- OAuthApplicationRegistrationService.addApplication(String appId, String appName, String redirectURI)
- Add a new client application to the list, and prints a success message containing the client ID.
- appId
- The identifier of the client application.
- appName
- The display name of the client application.
- redirectURI
- A URL used to transmit authorization credential responses to the OAuth client.
Example:
wsadmin>OAuthApplicationRegistrationService.addApplication("sample_application", "Sample Application", "http://www.renovations.com/oauth/redirect") An application was added with the new id c2834676-c8b6-4748-9fdc-7c639979f326.
Edit client application information
- OAuthApplicationRegistrationService.editApplication(String appId, String appName, String redirectURI)
- Edits a client application in the list, and prints the client ID.
- appId
- The identifier of the client application.
- appName
- The display name of the client application.
- redirectURI
- A URL used to transmit authorization credential responses to the OAuth client.
Example:
wsadmin>OAuthApplicationRegistrationService.editApplication("c2834676-c8b6-4748-9fdc-7c639979f326", "Edited Application", "An edited client application", "http://www.renovations.com/oauth/edited/redirect") The application with the id c2834676-c8b6-4748-9fdc-7c639979f326 was updated successfully.
View all client applications
- OAuthApplicationRegistrationService.browseApplications()
- Prints a list containing the information on all client applications, displaying the client ID, display name, and redirect URI of each item. There are no parameters.
Example:
wsadmin>OAuthApplicationRegistrationService.browseApplications() [{display_name=Sample Application, client_id=c2834676-c8b6-4748-9fdc-7c639979f326, client_secret=xxxxxxxxxxxxxxxxxxxxxxxx, redirect_uri=http://www.renovations.com/oauth/redirect}, {display_name=Yet Another Application, client_id=456, client_secret=xxxxxxxxxxxxxxxxxxxxxxxx, redirect_uri=http://www.yetanother.com/the/oauth/redirect}]
View one client application
- OAuthApplicationRegistrationService.getApplicationById(String appId)
- Prints the information on a single application, displaying the client ID, display name, and redirect URI.
- appId
- The identifier of the client application.
Example:
wsadmin>OAuthApplicationRegistrationService.getApplicationById("c2834676-c8b6-4748-9fdc-7c639979f326") {display_name=Sample Application, client_id=c2834676-c8b6-4748-9fdc-7c639979f326, client_secret=xxxxxxxxxxxxxxxxxxxxxxxx, redirect_uri=http://www.renovations.com/oauth/redirect}
Counting client applications
- OAuthApplicationRegistrationService.getApplicationCount()
- Return a count of known client applications. There are no parameters.
Example:
wsadmin>OAuthApplicationRegistrationService.getApplicationCount() 2
Delete a client application
- OAuthApplicationRegistrationService.deleteApplication(String appId)
- Deletes a single application from the list, and prints a success message containing the client ID.
- appId
- The identifier of the client application.
Example:
wsadmin>OAuthApplicationRegistrationService.deleteApplication("c2834676-c8b6-4748-9fdc-7c639979f326") The application with the id c2834676-c8b6-4748-9fdc-7c639979f326 was deleted successfully.
Parent topic:
Allow third-party applications access to data via the OAuth2 protocol
Related: