Last active
December 16, 2015 09:59
-
-
Save ryanvalentin/5416819 to your computer and use it in GitHub Desktop.
Example usage of the Disqus SSO example class
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
In your code-behind file, create a new instance of the DisqusSSO class, set the API key and call the generate method. NOTE: The method is overloaded and will optionally accept an avatar URL and/or a profile URL. | |
Depends on SSO class payload generator found here: https://github.com/disqus/DISQUS-API-Recipes/blob/master/cs/sso/DisqusSSO.cs | |
*/ | |
public string Payload { get; private set; } | |
public void GetSSOPayload(bool authenticated) | |
{ | |
if (authenticated == true) | |
{ | |
DisqusSSO sso = new DisqusSSO(); | |
sso.DisqusApiSecret = "DISQUS_SECRET_KEY"; | |
Payload = sso.GetDisqusPayload("uniqueId_123456789", "Charlie Chaplin", "[email protected]"); | |
} | |
else | |
{ | |
Payload = sso.LogoutUser(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment