toolness / hive-django

A Django-based Hive website for member organizations, their employees, and other community members.
https://directory.hivelearningnetworks.org
1 stars 10 forks source link

Add a Discourse SSO endpoint. #28

Closed toolness closed 10 years ago

toolness commented 10 years ago

This pull request adds an optional discourse_sso Django app which adds a /discourse_sso/ endpoint that implements the specification defined in the Official Single-Sign-On for Discourse.

Currently only vouched-for users are allowed to authenticate.

In Discourse, the user's name will be their full name followed by their organization name in parentheses, e.g. "Atul Varma (Hive NYC)". In the future we might change this so that the organization information is dynamically fetched by the Discourse instance, and hyperlinks are created that link back to the appropriate organization and individual profile pages, but this will require writing a Discourse plugin, so for now we'll just do the bare minimum required to make the experience not suck.

toolness commented 10 years ago

It might also be useful to link to the Discourse instance from the navbar of the directory. This ought to be easy since we can just look to settings.DISCOURSE_SSO_ORIGIN for the URL.