{"id":15689215,"url":"https://github.com/masterkale/goonauth2","last_synced_at":"2025-04-15T04:34:36.428Z","repository":{"id":73085914,"uuid":"53711548","full_name":"MasterKale/GoonAuth2","owner":"MasterKale","description":"REST API for verifying forum membership","archived":false,"fork":false,"pushed_at":"2022-12-08T06:37:15.000Z","size":100,"stargazers_count":2,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T16:04:53.395Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MasterKale.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-03-12T03:33:57.000Z","updated_at":"2020-02-25T03:03:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"6237a0e4-e657-45a4-8c4f-5f5f00c8195f","html_url":"https://github.com/MasterKale/GoonAuth2","commit_stats":{"total_commits":4,"total_committers":3,"mean_commits":"1.3333333333333333","dds":0.5,"last_synced_commit":"c825437af2555ede5c8f9b16c46e1d31c6202575"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MasterKale%2FGoonAuth2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MasterKale%2FGoonAuth2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MasterKale%2FGoonAuth2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MasterKale%2FGoonAuth2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MasterKale","download_url":"https://codeload.github.com/MasterKale/GoonAuth2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249007185,"owners_count":21197417,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T18:01:20.560Z","updated_at":"2025-04-15T04:34:36.410Z","avatar_url":"https://github.com/MasterKale.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GoonAuth2\n\nGoonAuth2 is a REST API service that can be used to authorize membership in the Something Is Awful internet forum.\n\n## Requirements\n\n- Pipenv\n- Python3 (v3.6+)\n- Redis (v5.0.0+)\n\n## Installation\n\nInstall dependencies with **Pipenv** via the included **Pipfile**:\n\n```sh\n$\u003e pipenv install\n```\n\nA few environment variables can be set within a **.env** file (placed in the root of this project) to customize functionality:\n\n- `REDIS_URL`\n    - **String** in the following format: `redis://[username]:[password]@[hostname]:6379`\n    - **Default:** \"\" (will attempt to connect to localhost:6379 without a username or password)\n- `HASH_LIFESPAN_MINS`\n    - **Number** of minutes a hash is good for\n    - **Default:** 5\n\nThe only things stored in the database are short-lived `key:value` pairs that automatically expire in `HASH_LIFESPAN_MINS * 60` seconds.\n\nThe following values will also need to be set so that the server can access SA profiles:\n\n- `COOKIE_SESSIONID`\n- `COOKIE_SESSIONHASH`\n- `COOKIE_BBUSERID`\n- `COOKIE_BBPASSWORD`.\n\nThese four values need to be taken from an existing logged-in user's cookies:\n\n![Something Is Awful Cookies](./docs/somethingisawful_cookies.png)\n\nOnce everything is in place, you can start the server using `gunicorn`:\n\n```sh\n$\u003e pipenv run start-prod\n```\n\n## Usage\n\n### 1. Generate a validation hash\n\nPOST to `/v1/generate_hash/` with a JSON-encoded payload containing a `username` value equal to the user's username.\n\nThe returned payload will contain a `hash` key with a random 32-character alphanumeric value:\n\n```json\n{\n    \"hash\": \"hMPAtkx6xIEtVfqqP0X9bvEG8lU4Yypb\"\n}\n```\n\nThe hash will expire after **5 minutes** but can easily be re-generated after expiration by re-submitting the above request.\n\n### 2. Update the user's profile with the hash\n\nDirect the user to save the above hash to a publicly-viewable section of their profile:\n\n![Something Is Awful User Profile](./docs/sia_profile.png)\n\nWherever they save it, it needs to be visible when they navigate to `http://forums.somethingisawful.com/member.php?action=getinfo\u0026username=\u003cUSERNAME_HERE\u003e`.\n\n### 3. Validate the user\n\nOnce the hash is in-place, POST a request to `/v1/validate_user/` with a JSON-encoded payload containing a `username` value equal to the user's username.\n\nThe returned payload will contain a `validated` key with a `boolean` value of whether or not the hash was detected :\n\n```json\n{\n    \"validated\": true\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmasterkale%2Fgoonauth2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmasterkale%2Fgoonauth2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmasterkale%2Fgoonauth2/lists"}