Edit Sample Application
Migrate to the Distributed API
1
Make sure your OpenID consumer reads the
{openid}
parameters
From now on, each AppDirect-powered marketplace will have its own OpenID provider instead of relying on
www.appdirect.com.
You will need to remove the hardcoded URL of AppDirect's OpenID provider in your consumer and replace it with the
{openid}
placeholder in your configuration to know which provider to query.
Your consumer should accept:
http://www.example.com/login?openid_identifier={openid}
2 Update your event listener URLs
The events can now be triggered on any AppDirect-powered marketplace. Instead of passing the event
{token}
, we're now passing the
{eventUrl}
, so you'll need to update the logic in your event listener accordingly. When receiving a call on one of your event listener URLs, you'll need to:
- Verify the OAuth signature of the call to validate that it comes from an authorized AppDirect-powered marketplace
-
Read the
{eventUrl}
(instead of reading the event{token}
) - Perform a GET to this URL signed with your OAuth credentials
- Process the event as appropriate
- Return a valid response to the event notification
Example URL before:
http://www.example.com/foo?token={token}
Example URL after:
http://www.example.com/foo?url={eventUrl}
3 Update the OpenID URLs for your existing users
OpenID data for your current marketplace users must be updated in your product's database.
Update OpenID data via SQL
If you use a SQL-based database, the form below will generate SQL script that will update the OpenID for your existing users. Input the name of the table that stores these OpenIDs and the name of the column in which they are stored, and then execute the SQL on your database.
Update OpenID data via manual export
Alternatively, you can export the user account information we have collected and manually update their OpenID values:
4 Update Integration Report
Let us know you have completed this step of the integration by checking off the "Migrate to the distributed API" item in your Integration Report.