Skip to content

Instantly share code, notes, and snippets.

View anindyaspaul's full-sized avatar
🤓

Anindya Sundar Paul anindyaspaul

🤓
View GitHub Profile
@anindyaspaul
anindyaspaul / disourse_sso_drf.py
Last active June 15, 2020 16:59 — forked from alee/views.py
Django Rest Framework SSO endpoint for Discourse forum
"""Single Sign On view for Discourse forum
The view returns the required payload and signature for discourse.
These payloads have to be urlencoded by the client and passed as
query parameter to the discourse sso login url.
Signature validation depends on settings.SECRET_KEY.
Add this as the secret key in discourse sso settings.
References:
/*************************************
* Program : Ordered Link List *
* Author : Anindya Sundar Paul *
* Date : 04-06-2013 *
* Started : 03.58 PM *
* Ended : 07.15 PM *
*************************************/
// All '\n's throughout the program are mainly for nice well-spaced output