Last active
May 8, 2018 02:14
-
-
Save tempusthales/1976a510d005682ba6268b79a19f1545 to your computer and use it in GitHub Desktop.
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
GoonAuth2 | |
GoonAuth2 is a REST API server that can be used to authorize members of the Something Is Awful internet forum. | |
Validating membership | |
1. Generate a validation hash | |
POST to http://auth.everythingisgoon.com/v1/generate_hash/ with a JSON-encoded payload containing a username value equal to the | |
user’s username. | |
The returned payload will contain a hash key with a random 32-character alphanumeric value: | |
{ | |
"hash": "hMPAtkx6xIEtVfqqP0X9bvEG8lU4Yypb" | |
} | |
The hash will expire after 5 minutes but can easily be re-generated by re-running the above command. | |
2. Update the user’s profile with the hash | |
Direct the user to save the above hash to a publicly-viewable section of their profile: | |
Something Is Awful User Profile | |
Wherever they save it, it needs to be visible when they navigate to | |
http://forums.somethingisawful.com/member.php?action=getinfo&username=<USERNAME_HERE>. | |
3. Validate the user | |
Once the hash is in-place, POST a request to http://auth.everythingisgoon.com/v1/validate_user/ with a JSON-encoded payload | |
containing a username value equal to the user’s username. | |
The returned payload will contain a validated key with a boolean value of whether or not the hash was detected : | |
{ | |
"validated": true | |
} | |
And that’s all there is to it. Do with this as you will. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment