GPII Account Setup APIs

From wiki.gpii
Jump to: navigation, search

Introduction

The wireframe for GPII account setup is in progress and can be found here.

At the time of writing on Apr 2, 2018, this wiki page mainly contains thoughts and questions of the in-progress wireframe.

Wireframes in progress

1. Create GPII keys

  • Create keys individually
  • Create keys in bulk

Question: Consult how snapset keys are created for AJCs ?

2. Create a preferences safe

Rough Technical Design for Creating Preferences Sets

Methods to Create Preferences Set

  1. Copy a snapset
  2. Use discovery tool
  3. Copy from a computer, using the capture tool
  4. Copy from a friend, using a sharing code

Technical Design for these methods

Step 1: Request an access token through Resource Owner GPII Key Grant via the existing /access_token endpoint.

Step 2: POST request to /:gpiiKey/settings/ to create a preferences set.

  • Header: Authorization: Bearer <access_token>
  • Body: Different body content for different method

1. Method 1: Copy a snapset

{
    snapSetKey: {String}
}

2. Method 2: Use discovery tool & Method 3: Use Capture Tool

{
    preferences: {Object}
}

3. Method 4: Copy from a friend, using a sharing code

{
    sharingCode: {String}
}

Thoughts

  • Refer to the keys prototype page, GPII needs to support that a GPII key can associate with any prefs set in a perfs safe. Right now, a key is linked to the default preference set "gpii-default".

Questions

  • Refer to the "sign-up with email" page, what’s the mapping relationship between “Cloud-Safe Name” and “E-mail address”? Can one email address be signed up to associate with several cloud safes? According to Keys, prefs sets and prefs safes document, it’s possible to have one user own multiple prefs safes.
  • Refer to the start page -> steps "the safe doesn’t have authentication" and "the safe’s email hasn’t been verified":
  1. Does authentication mean to setup the safe account?
  2. Does it also mean that anonymous safes are not allowed? All cloud safes must have safe account/pwd set up as well as having emails associated with safes? This is against what's defined in Keys, Preference Sets, and Preference Safes document.

References