Skip to content

Creating a new client

brian717 edited this page Apr 10, 2014 · 3 revisions

This page describes how to use the Registry to create a new client on openPDS, as well as how to authorize this client for access to a user's PDS from within an Android application

Create the client on the Registry Server

On your registry server, log in and proceed to: /account/clients

From there, a list of all clients you have created will appear, along with a simple form to create a new client:

  1. Fill out the name for your new client
  2. Click "Create Client"
  3. Take note of the credentials for your client in the next few steps - they will be required for use within your client application.
  4. Copy down the Key and Secret on the resulting page, then click on the link for your new client
  5. Copy down the complete Basic authorization string from the resulting page. This should look something like: Basic NmQ3YzUyNzE5NTBmY2ZhNmY4MzJlNmMwZTA3N2E3OmY3MzcyMTZmOTY3M2MwY2I0NzRhMGJjMzA3NjdhZA== (please note the word "Basic" and subsequent space is included in this string).

Define scopes that your application will use

From the AccessRange model in the django admin interface (located at /admin/oauth2app/accessrange/ on your registry server), choose the scopes that your client will request access to. For example, if your client needs to write funf data, you may use the pre-existing funf_write scope. If your application is adding a new connector to write survey data to the PDS, you may want to create a new scope named survey_write to correspond to it. Be as descriptive as possible with both the name of your scope and the associated description, as these are user-facing and must inform the user of the data you will be accessing.