{"id":15987404,"url":"https://github.com/sh4yy/cherryauth","last_synced_at":"2026-01-21T15:32:32.093Z","repository":{"id":39761976,"uuid":"194908331","full_name":"Sh4yy/CherryAuth","owner":"Sh4yy","description":"A Central Authentication Microservice","archived":false,"fork":false,"pushed_at":"2022-12-08T05:50:29.000Z","size":67,"stargazers_count":3,"open_issues_count":7,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-07T15:53:01.429Z","etag":null,"topics":["authentication","microservice","python","vibora"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Sh4yy.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":"2019-07-02T17:37:12.000Z","updated_at":"2025-02-21T21:57:07.000Z","dependencies_parsed_at":"2023-01-24T15:15:22.314Z","dependency_job_id":null,"html_url":"https://github.com/Sh4yy/CherryAuth","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Sh4yy/CherryAuth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sh4yy%2FCherryAuth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sh4yy%2FCherryAuth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sh4yy%2FCherryAuth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sh4yy%2FCherryAuth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sh4yy","download_url":"https://codeload.github.com/Sh4yy/CherryAuth/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sh4yy%2FCherryAuth/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28635863,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T15:01:31.228Z","status":"ssl_error","status_checked_at":"2026-01-21T14:42:58.942Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["authentication","microservice","python","vibora"],"created_at":"2024-10-08T03:23:11.635Z","updated_at":"2026-01-21T15:32:32.075Z","avatar_url":"https://github.com/Sh4yy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Frame](https://user-images.githubusercontent.com/23535123/60550765-12eeb600-9cf7-11e9-92e8-06332c17f835.png)\nA central authentication microservice\nThe purpose for this app is to have a generic authentication service that could be intergrated in all sorts of applications!\n\n# Routes\n## Register\nRegister a new User/Identity.\\\n**Route**: `/v1/register`\\\n**Method** : `POST`\\\n**Port** : `5001`\\\n**Authorization** : `Basic Auth` \\\n**Headers**:\n```json\n{\n    \"Authorization\": \"Basic YTI5ODhjYTIwOWFkMDkwN2QzYWY5YzFjM2I3YWNiMWU6ZG9udHVzZXRoaXNwYXNzd29yZA==\"\n}\n```\n**Response**:\n```json\n{\n    \"uid\": \"a2988ca209ad0907d3af9c1c3b7acb1e\",\n    \"reg_date\": 1562184696,\n    \"ok\": true,\n    \"timestamp\": 1562184696.5919928551\n}\n```\n**Possiple Errors**\n\n```\nIf missing authorization header.\nCode: `400 BAD REQUEST`\nMessage: `missing authorization header`\n```\n```\nIf User/Identity Already Exist.\nCode: `400 BAD REQUEST`\nMessage: `user already exist`\n```\n\n## Login\nCreate a new JWT token for a User/Identity.\\\n**Route**: `/v1/login`\\\n**Method** : `GET`\\\n**Port** : `5001`\\\n**Authorization** : `Basic Auth` \\\n**Headers**:\n```json\n{\n    \"Authorization\": \"Basic YTI5ODhjYTIwOWFkMDkwN2QzYWY5YzFjM2I3YWNiMWU6ZG9udHVzZXRoaXNwYXNzd29yZA==\"\n}\n```\n**Response**:\n```json\n{\n    \"jwt\": {\n        \"token\": \"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzaWQiOiJmMTJkMDEwZTIyOGU5NTY5OGZmNzk5MTY5MzRjM2VlMyIsImlhdCI6MTU2MjE4NTA1NSwiZXhwIjoxNTYyMTg4NjU1LCJ1aWQiOiJhMjk4OGNhMjA5YWQwOTA3ZDNhZjljMWMzYjdhY2IxZSJ9.Y0FHxuBcZLJvUMp49ZQa49Z5F6XwKubyBNA5hcnNSrw\",\n        \"refresh_token\": \"226c1a30f26c9af6a825b29d4204990e43446e5bab690d5134ddd70ab20725f2\",\n        \"payload\": {\n            \"sid\": \"f12d010e228e95698ff79916934c3ee3\",\n            \"iat\": 1562185055,\n            \"exp\": 1562188655,\n            \"uid\": \"a2988ca209ad0907d3af9c1c3b7acb1e\"\n        }\n    },\n    \"uid\": \"a2988ca209ad0907d3af9c1c3b7acb1e\",\n    \"ok\": true,\n    \"timestamp\": 1562185055.7063784599\n}\n```\n\n**Possiple Errors**\n\n```\nIf missing authorization header.\nCode: `400 BAD REQUEST`\nMessage: `missing authorization header`\n```\n```\nIf User/Identity does not exist.\nCode: `404 Not Found`\nMessage: `user does not exist`\n```\n```\nIf Credentials are not correct.\nCode: `401 Unauthorized`\nMessage: `incorrect credentials`\n```\n\n## Logout\nTerminate a session for a User.\\\n**Route**: `/v1/logout`\\\n**Method** : `POST`\\\n**Port** : `5001`\\\n**Authorization** : `Bearer Auth` \\\n**Headers**:\n```json\n{\n    \"Authorization\": \"Bearer 226c1a30f26c9af6a825b29d4204990e43446e5bab690d5134ddd70ab20725f2\"\n}\n```\n**Response**:\n```json\n{\n    \"logged_out\": true,\n    \"token\": \"226c1a30f26c9af6a825b29d4204990e43446e5bab690d5134ddd70ab20725f2\",\n    \"uid\": \"a2988ca209ad0907d3af9c1c3b7acb1e\",\n    \"ok\": true,\n    \"timestamp\": 1562185790.1397087574\n}\n```\n\n**Possiple Errors**\n\n```\nIf authorization method is not Bearer.\nCode: `400 BAD REQUEST`\nMessage: `invalid authorization method`\n```\n```\nIf authorization header is missing the token.\nCode: `400 BAD REQUEST`\nMessage: `invalid authorization token`\n```\n```\nIf missing authorization header.\nCode: `400 BAD REQUEST`\nMessage: `missing authorization header`\n```\n```\nIf Session does not exist.\nCode: `404 Not Found`\nMessage: `session does not exist`\n```\n```\nIf Credentials are not correct.\nCode: `401 Unauthorized`\nMessage: `incorrect credentials`\n```\n\nNote that for logout, instead of passing the JWT token in the Authorization header, the refresh token must be passed.\n\n## Refersh Token\nRefreshing a JWT token after its expired.\\\n**Route**: `/v1/token/refresh`\\\n**Method** : `GET`\\\n**Port** : `5001`\\\n**Authorization** : `Bearer Auth` \\\n**Headers**:\n```json\n{\n    \"Authorization\": \"Bearer 226c1a30f26c9af6a825b29d4204990e43446e5bab690d5134ddd70ab20725f2\"\n}\n```\n**Response**:\n```json\n{\n    \"jwt\": {\n        \"token\": \"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzaWQiOiJhODY2YTZmODQxNjY5YTcyOTg0YjAwNTVlYWNiMDU5ZCIsImlhdCI6MTU2MjE4NjE0OSwiZXhwIjoxNTYyMTg5NzQ5LCJ1aWQiOiJhMjk4OGNhMjA5YWQwOTA3ZDNhZjljMWMzYjdhY2IxZSJ9.qKseJAKOQjH_3cTQsRQwuAhwHIdAnMos27weGxUsNUY\",\n        \"refresh_token\": \"f2617cabda2b1d88c7002a985c79e30d8b77277a06aca4382b4fab08553728ae\",\n        \"payload\": {\n            \"sid\": \"a866a6f841669a72984b0055eacb059d\",\n            \"iat\": 1562186149,\n            \"exp\": 1562189749,\n            \"uid\": \"a2988ca209ad0907d3af9c1c3b7acb1e\"\n        }\n    },\n    \"uid\": \"a2988ca209ad0907d3af9c1c3b7acb1e\",\n    \"ok\": true,\n    \"timestamp\": 1562186149.7159590721\n}\n```\n\n**Possiple Errors**\n\n```\nIf authorization method is not Bearer.\nCode: `400 BAD REQUEST`\nMessage: `invalid authorization method`\n```\n```\nIf authorization header is missing the token.\nCode: `400 BAD REQUEST`\nMessage: `invalid authorization token`\n```\n```\nIf missing authorization header.\nCode: `400 BAD REQUEST`\nMessage: `missing authorization header`\n```\n```\nIf Session does not exist.\nCode: `404 Not Found`\nMessage: `session does not exist`\n```\n\nNote that for Refreshing the JWT token, instead of passing the JWT token in the Authorization header, the refresh token must be passed.\n\n## Changing Password\nChanging a User's password.\\\n**Route**: `/v1/password/change`\\\n**Method** : `POST`\\\n**Port** : `5001`\\\n**Authorization** : `Basic Auth` \\\n**Headers**:\n```json\n{\n    \"Authorization\": \"Basic YTI5ODhjYTIwOWFkMDkwN2QzYWY5YzFjM2I3YWNiMWU6ZG9udHVzZXRoaXNwYXNzd29yZA==\"\n}\n```\n**Request Body**\n```json\n{\n\t\"new_password\": \"new password here\",\n\t\"kill_sessions\": false\n}\n```\n**Response**:\n```json\n{\n    \"changed_password\": true,\n    \"killed_sessions\": false,\n    \"ok\": true,\n    \"timestamp\": 1562186437.9157345295\n}\n```\n\n**Possiple Errors**\n\n```\nIf missing authorization header.\nCode: `400 BAD REQUEST`\nMessage: `missing authorization header`\n```\n```\nIf User does not exist.\nCode: `404 Not Found`\nMessage: `session does not exist`\n```\n```\nIf Credentials are not correct.\nCode: `401 Unauthorized`\nMessage: `incorrect credentials`\n```\n\nNote that for this route, kill_session is an optional body field which will kill every active session for this user if is set to True. Also, old password must be passed with user id as basic authorization header\n\n## Verify JWT Token\n verify a user's jwt token.\\\n**Route**: `/v1/verify`\\\n**Method** : `POST`\\\n**Port** : `5001`\\\n**Authorization** : `Bearer Auth` \\\n**Headers**:\n```json\n{\n    \"Authorization\": \"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzaWQiOiJhODY2YTZmODQxNjY5YTcyOTg0YjAwNTVlYWNiMDU5ZCIsImlhdCI6MTU2MjE4NTYxMiwiZXhwIjoxNTYyMTg5MjEyLCJ1aWQiOiJhMjk4OGNhMjA5YWQwOTA3ZDNhZjljMWMzYjdhY2IxZSJ9.72dUB4p4g_L3Bx6UpqQZMCVn3So2Bn7K2xulDWFRJEQ\"\n}\n```\n**Response**:\n```json\n{\n    \"valid\": true,\n    \"payload\": {\n        \"sid\": \"a866a6f841669a72984b0055eacb059d\",\n        \"iat\": 1562185612,\n        \"exp\": 1562189212,\n        \"uid\": \"a2988ca209ad0907d3af9c1c3b7acb1e\"\n    },\n    \"ok\": true,\n    \"timestamp\": 1562186902.8546676636\n}\n```\n\n**Possiple Errors**\n\n```\nIf missing authorization header.\nCode: `400 BAD REQUEST`\nMessage: `missing authorization header`\n```\n```\nIf authorization method is not Bearer.\nCode: `400 BAD REQUEST`\nMessage: `invalid authorization method`\n```\n```\nIf authorization header is missing the token.\nCode: `400 BAD REQUEST`\nMessage: `invalid authorization token`\n```\n```\nIf JWT token is Expired.\nCode: `401 Unauthorized`\nMessage: `expired signature`\n```\n```\nIf JWT token has an invalid signature.\nCode: `401 Unauthorized`\nMessage: `invalid signature`\n```\n```\nOther possible JWT errors.\nCode: `401 Unauthorized`\nMessage: `invalid token`\n```\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsh4yy%2Fcherryauth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsh4yy%2Fcherryauth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsh4yy%2Fcherryauth/lists"}