{"id":18188739,"url":"https://github.com/jor2/djangorestapiauth","last_synced_at":"2025-04-07T14:25:17.312Z","repository":{"id":199379894,"uuid":"312945991","full_name":"jor2/DjangoRestApiAuth","owner":"jor2","description":"Django restful api backend that issues tokens to the Flask frontend.","archived":false,"fork":false,"pushed_at":"2020-11-15T21:34:30.000Z","size":38,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-13T16:51:44.756Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/jor2.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}},"created_at":"2020-11-15T02:54:47.000Z","updated_at":"2020-11-16T12:36:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"76c62c3a-2f0f-4e1f-9559-0b59af2be3ea","html_url":"https://github.com/jor2/DjangoRestApiAuth","commit_stats":null,"previous_names":["jor2/djangorestapiauth"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jor2%2FDjangoRestApiAuth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jor2%2FDjangoRestApiAuth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jor2%2FDjangoRestApiAuth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jor2%2FDjangoRestApiAuth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jor2","download_url":"https://codeload.github.com/jor2/DjangoRestApiAuth/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247667151,"owners_count":20975997,"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-11-03T03:04:11.505Z","updated_at":"2025-04-07T14:25:17.291Z","avatar_url":"https://github.com/jor2.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Django Oauth App\n-\n### N-tier architecture\n- 2 Python Services\n- Wrapped in Docker \u0026 Deployed on Google Kubernetes Engine\n- Backend written using Django to issue/revoke tokens etc to the frontend service.\n- Frontend written in Flask to request and store/use all the token functionality of the backend.\n- Used https://django-oauth-toolkit.readthedocs.io/en/latest/ to implement token functionality.\n\n##### Run Locally:\nvia Docker compose:\n```bash\ndocker-compose up --build\n```\n\nvia Minikube:\n```bash\nkubectl apply -f kube/deployment.yaml\n```\n\n##### View Web Service at:\n- Frontend: http://34.105.239.60:5000/\n- Backend: http://34.89.36.19:8000/\n\n#### Enpoints of backend are:\n```bash\n/register/\n/login/\n/logout/\n/refresh/\n/api/hello/\n```\n\nThey can be accessed as such:\n```bash\nhttp post http://34.89.36.19:8000/register/ username='test1' password='password'\nhttp post http://34.89.36.19:8000/login/ username='test1' password='password'\nhttp post http://34.89.36.19:8000/logout/ token='zHBfbaO1NYXCGZjFAwarKtVKom3hxw'\nhttp post http://34.89.36.19:8000/refresh/ refresh_token='kIuQ3enXkoDSS1Q4pEYr7uOgr6snX3'\nhttp http://34.89.36.19:8000/api/hello/ 'Authorization: Bearer XpLAPD7fpViEsknIWR8XyThvlKpIxl'\n```\n\nAll these endpoints can also be accessed on the frontend. The hello or Super Secret Message on the frontend displays token auth working. Only logged in users with valid tokens can view.\n\nThe frontend is meant to output results so you can see the results from the backend and demo only. Obviously wouldn't do this outside of demo.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjor2%2Fdjangorestapiauth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjor2%2Fdjangorestapiauth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjor2%2Fdjangorestapiauth/lists"}