{"id":24708369,"url":"https://github.com/surface-security/django-apitokens","last_synced_at":"2026-05-19T03:41:23.005Z","repository":{"id":149079818,"uuid":"616608666","full_name":"surface-security/django-apitokens","owner":"surface-security","description":"Manage and Create DRF-compatible tokens from the UI","archived":false,"fork":false,"pushed_at":"2023-07-27T10:44:35.000Z","size":28,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-01-27T06:34:37.303Z","etag":null,"topics":["django","django-rest-framework","python","token-based-authentication"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/django-apitokens/","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/surface-security.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":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-20T18:11:33.000Z","updated_at":"2023-04-02T23:07:57.000Z","dependencies_parsed_at":"2025-01-27T06:41:53.429Z","dependency_job_id":null,"html_url":"https://github.com/surface-security/django-apitokens","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/surface-security%2Fdjango-apitokens","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/surface-security%2Fdjango-apitokens/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/surface-security%2Fdjango-apitokens/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/surface-security%2Fdjango-apitokens/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/surface-security","download_url":"https://codeload.github.com/surface-security/django-apitokens/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244913329,"owners_count":20530817,"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":["django","django-rest-framework","python","token-based-authentication"],"created_at":"2025-01-27T06:31:39.969Z","updated_at":"2026-05-19T03:41:22.945Z","avatar_url":"https://github.com/surface-security.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# django-apitokens\n\nGenerate tokens compatible with Django Restframework (`drf`) from your Django Admin view:\n- Create new tokens at will (after being generated, they no longer can be reversed, since only a digest is stored in the database).\n- Add expirity dates (supports time and date)\n- Remove tokens when you no longer need them.\n\n## My Token view\n\n![Screenshot 2023-03-21 at 14 47 02](https://user-images.githubusercontent.com/7786556/226643622-893b631d-d353-4833-8def-78f61ea77561.png)\n\n\n## Add token view\n\n![Screenshot 2023-03-21 at 14 47 19](https://user-images.githubusercontent.com/7786556/226643580-ac761fd7-91a9-4c5c-898b-4cc1daf9d812.png)\n\n\n# Install\n\n- Install the python package: `pip install django-apitokens` \n- Add `apitokens` to your Django installed apps:\n\n```python\n# In your settings.py\nINSTALLED_APPS = [\n    ...\n    'apitokens',\n]\n```\n\n- Ensure you are using `knox` `TokenAuthentication` class:\n\n```python\n# In your settings.py\nREST_FRAMEWORK = {\n    ...,\n    'DEFAULT_AUTHENTICATION_CLASSES': (\n        'knox.auth.TokenAuthentication',\n        ...,\n    ),\n    ...,\n}\n```\n\n- You are set to use tokens generated through this app as a way to login with the DRF framework.\n\n# Contributing\n\nTo contribute code to this app, ensure you're following the [community guidelines](https://github.com/surface-security/guidelines#contributing)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsurface-security%2Fdjango-apitokens","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsurface-security%2Fdjango-apitokens","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsurface-security%2Fdjango-apitokens/lists"}