{"id":18914307,"url":"https://github.com/tolstoyevsky/cusdeb-anonymous","last_synced_at":"2026-03-09T19:30:23.010Z","repository":{"id":54535450,"uuid":"294525492","full_name":"tolstoyevsky/cusdeb-anonymous","owner":"tolstoyevsky","description":"Microservice intended for issuing JWT tokens for anonymous access to CusDeb","archived":false,"fork":false,"pushed_at":"2021-02-12T08:58:58.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-12-31T14:36:22.981Z","etag":null,"topics":["aiohttp","cusdeb","jwt","python3","restful-api"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tolstoyevsky.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-09-10T21:23:32.000Z","updated_at":"2021-02-12T08:58:59.000Z","dependencies_parsed_at":"2022-08-13T19:00:45.713Z","dependency_job_id":null,"html_url":"https://github.com/tolstoyevsky/cusdeb-anonymous","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tolstoyevsky%2Fcusdeb-anonymous","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tolstoyevsky%2Fcusdeb-anonymous/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tolstoyevsky%2Fcusdeb-anonymous/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tolstoyevsky%2Fcusdeb-anonymous/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tolstoyevsky","download_url":"https://codeload.github.com/tolstoyevsky/cusdeb-anonymous/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239907240,"owners_count":19716584,"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":["aiohttp","cusdeb","jwt","python3","restful-api"],"created_at":"2024-11-08T10:10:57.596Z","updated_at":"2026-03-09T19:30:22.972Z","avatar_url":"https://github.com/tolstoyevsky.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CusDeb Anonymous\n\nCusDeb Anonymous is a microservice intended for issuing JWT tokens for anonymous access to [CusDeb](https://cusdeb.com).\n\n## Installation\n\n```\n$ git clone https://github.com/tolstoyevsky/cusdeb-anonymous.git\n$ virtualenv -ppython3 cusdeb-anonymous-env\n$ source cusdeb-anonymous-env/bin/activate\n(cusdeb-helpik-env) $ cd cusdeb-anonymous\n(cusdeb-helpik-env) $ python3 setup.py install\n(cusdeb-helpik-env) $ python3 bin/server.py\n```\n\n## Configuration\n\nThe microservice can be configured via the following environment variables (called params).\n\n| Param         | Description                                                                                                                                           | Default        |\n|---------------|-------------------------------------------------------------------------------------------------------------------------------------------------------|----------------|\n| `ALGO`        | The algorithm used for encoding the JWT tokens.                                                                                                       | `HS256`        |\n| `ISSUE_DELAY` | The delay (in seconds) in issuing the JWT tokens.                                                                                                     | `5`            |\n| `PORT`        | The port the CusDeb Anonymous server listens on.                                                                                                      | `8007`         |\n| `SECRET_KEY`  | The secret key used for encoding the JWT tokens. It's **HIGHLY RECOMMENDED** to change the default value.                                             | `secret`       |\n| `TIME_ZONE`   | A string representing the time zone for this installation. See the [list of time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).| `Europe/Moscow`|\n| `TOKEN_TTL`   | How long (in seconds) the JWT tokens are alive.                                                                                                       | `20`           |\n\n## API\n\n* **URI:** `/anonymous/`\n* **Method:** `GET`\n* **Params:** None\n* **Success Response**\n  * **Code:** 200\n  * **Content:** *an encoded JWT token*\u003cbr/\u003e\n    Each JWT token issued by the microservice has the following payload: `{'token_type': 'access', 'exp': \u003cexp\u003e, 'jti': '\u003cjti\u003e', 'user_id': -1}`, where\n    * `token_type` is obviously a token type. The field always contains `access`.\n      A refresh token is not provided, therefore to obtain a new access token, invoke the endpoint once again.\n    * `exp` is an expiration date (see the `TOKEN_TTL` param above). It accepts integer numbers known as Unix timestamps.\n    * `jti` is a JWT ID (see [Section 4.1.7](https://tools.ietf.org/html/rfc7519#page-10) of RFC 7519).\n    * `user_id` is the pseudo id of an anonymous user. The field always contains `-1` to let clients easily distinguish the pseudo id from a real one.\n\n## Authors\n\nSee [AUTHORS](AUTHORS.md).\n\n## Licensing\n\nCusDeb Anonymous is available under the [Apache License, Version 2.0](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftolstoyevsky%2Fcusdeb-anonymous","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftolstoyevsky%2Fcusdeb-anonymous","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftolstoyevsky%2Fcusdeb-anonymous/lists"}