TCO16 Bonus - Topcoder - Implement Signal-Sign-On APIs for Message Service

Register
Submit a solution
The challenge is finished.

Challenge Overview

We'd like to implement the required endpoints like (/sso etc) to make the Message Service as the identity provider for Discourse to perform SSO.

In order to validate users, and get user information, the required endpoint will make a call to identity service (/v3/users/{handle})

SSO should override first name, last name, email, and avatar.

The Discourse PoC which we did a few months ago provides a good sample implementation of this functionality, please use that as reference.

Using Identity Service to Fetch User Information

You are not required to setup identify service, but mock the APIs in mock service for testing purpose, you can find the sample API here - https://docs.google.com/document/d/1JTJDglQt9KCseSKcNJ47mTUzVczAAvjTgmNKOzt5gac/pub.  in order to call the APIs, it needs client id, secret, and identity service base url, these should be read from environment variables.

Unit Tests
Please follow the current approach to add unit tests, following are the general guideline:

- All test files should live along with the source but named *.spec.js, for eg. app/routes/threads/list.js test file should be app/routes/threads/list.spec.js
- Executing `npm test` runs all test files (**/*.spec.js)

Local Setup 
Please check the README.md file in local directory to get the setup instructions for local setup and testing
 
Integration Testing
With the newly implemented endpoints, you are expected to configure and validate that the Discourse PoC can work with it and the functionality remains.

Final Submission Guidelines

- Code Changes For the required endpoints including unit tests
- Updated README.md file for local setup if needed.
- Verification Steps for Discourse Integration.

ELIGIBLE EVENTS:

2016 TopCoder(R) Open

Review style

Final Review

Community Review Board

Approval

User Sign-Off

ID: 30054930