{"id":16421746,"url":"https://github.com/peppelinux/django-oidc-op","last_synced_at":"2025-03-21T03:33:39.457Z","repository":{"id":44687836,"uuid":"207310886","full_name":"peppelinux/django-oidc-op","owner":"peppelinux","description":"A Django implementation of an OIDC Provider on top of IdentityPython jwtconnect stack.","archived":false,"fork":false,"pushed_at":"2022-03-31T20:08:06.000Z","size":3240,"stargazers_count":13,"open_issues_count":5,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-17T20:43:03.310Z","etag":null,"topics":["django","django-oidc-op","jwtconnect","oidc","oidc-op","oidc-provider","openid-configuration"],"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/peppelinux.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-09-09T13:05:19.000Z","updated_at":"2024-08-27T14:12:41.000Z","dependencies_parsed_at":"2022-08-19T18:20:36.282Z","dependency_job_id":null,"html_url":"https://github.com/peppelinux/django-oidc-op","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peppelinux%2Fdjango-oidc-op","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peppelinux%2Fdjango-oidc-op/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peppelinux%2Fdjango-oidc-op/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peppelinux%2Fdjango-oidc-op/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peppelinux","download_url":"https://codeload.github.com/peppelinux/django-oidc-op/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244734070,"owners_count":20501014,"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-oidc-op","jwtconnect","oidc","oidc-op","oidc-provider","openid-configuration"],"created_at":"2024-10-11T07:34:35.489Z","updated_at":"2025-03-21T03:33:39.027Z","avatar_url":"https://github.com/peppelinux.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# django-oidc-op\n\n![CI build](https://github.com/peppelinux/django-oidc-op/workflows/django-oidc-op/badge.svg)\n![pypi](https://img.shields.io/pypi/v/oidc_provider.svg)\n![License](https://img.shields.io/badge/license-Apache%202-blue.svg)\n![Python version](https://img.shields.io/badge/python-3.7%20%7C%203.8%20%7C%203.9-blue.svg)\n\nA Django implementation of an **OIDC Provider**/**OAuth2 AS** on top of [jwtconnect.io](https://jwtconnect.io/).\nThis project is based on [IdentityPython oidc-op](https://github.com/IdentityPython/oidc-op).\nPlease consult the official [oidc-op documentation](https://oidcop.readthedocs.io/en/latest/) for any further information about its features and capabilities.\n\nTo configure a standard OIDC Provider you have to edit the oidcop configuration file.\nSee `django-oidc-op/oidc_provider/tests/example/example/settings.py` and `django-oidc-op/oidc_provider/tests/example/example/oidc_provider_settings.py` to get in.\n\n## Run the example demo\n````\ngit clone https://github.com/peppelinux/django-oidc-op.git\ncd django-oidc-op\n\npip install -r requirements.txt\ncd example\n\n./manage.py createsuperuser\n\nbash run.sh\n````\n\n#### Example Relying-Party\n\nYou can use [JWTConnect-Python-OidcRP](https://github.com/openid/JWTConnect-Python-OidcRP) as follow:\n```\ncd JWTConnect-Python-OidcRP/example\nRP_LOGFILE_NAME=\"./flrp.django.log\" python3 -m flask_rp.wsgi ../django-oidc-op/example/data/oidc_rp/conf.django.yaml\n```\n\nYou can also use a scripted RP handler on top of oidc-rp\n````\npython3 snippets/rp_handler.py -c oidc_provider/tests/oidc_rp/conf.json -u test -p testami18 -iss django_provider\n````\n\n## Configuration\n\nThis project relyies interely on behaviour and features provided by oidcop, to get an exaustive integration in Django it\nadopts the following customizations.\n\n#### oidc_provider_settings.py\n\nIn the example project it handles all the oidcop configurations.\nI think it's more cleaner but feel free to adapt in your preferred schema.\n\n#### Settings\n\n- `OIDCOP_CONFIG` is a python dictionary that contains the oidcop configuration.\n- `OIDC_URL_PREFIX`, eg: `oidcop/` if present will be used as url path in all the oidcop endpoints, except for `.well-known/openid-configuration`. In the example project I put this parameter in `oidc_provider_settings`, default is `''`.\n\n\n#### UserInfo endpoint\n\nClaims to be released are configured in `op.server_info.user_info` (in `oidc_provider_settings.py`).\nThe attributes release and user authentication mechanism rely on classes implemented in `oidc_op/users.py`.\n\nConfiguration Example:\n\n````\n      \"userinfo\": {\n        \"class\": \"oidc_provider.users.UserInfo\",\n        \"kwargs\": {\n            # map claims to django user attributes here:\n            \"claims_map\": {\n                \"phone_number\": \"telephone\",\n                \"family_name\": \"last_name\",\n                \"given_name\": \"first_name\",\n                \"email\": \"email\",\n                \"verified_email\": \"email\",\n                \"gender\": \"gender\",\n                \"birthdate\": \"get_oidc_birthdate\",\n                \"updated_at\": \"get_oidc_lastlogin\"\n            }\n        }\n      }\n````\n\n## Developers'\n\n#### Running tests\n\nrunning tests\n````\n./manage.py test oidc_provider\n````\n\n#### coverage\n````\ncoverage erase\ncoverage run manage.py test oidc_provider\ncoverage report -m\n````\n\n## Author\n\n- Giuseppe De Marco\n\n\n## Gallery\n\n#### Relying-Party\n![Alt text](images/rp2.png)\n![Alt text](images/rp_detail.png)\n\n#### Session management and token preview\n![Alt text](images/session_detail.png)\n![Alt text](images/issued_token_list.png)\n![Alt text](images/issued_token_detail.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeppelinux%2Fdjango-oidc-op","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeppelinux%2Fdjango-oidc-op","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeppelinux%2Fdjango-oidc-op/lists"}