{"id":13813483,"url":"https://github.com/mozilla/mozilla-django-oidc","last_synced_at":"2025-05-15T02:10:29.444Z","repository":{"id":11792986,"uuid":"70578420","full_name":"mozilla/mozilla-django-oidc","owner":"mozilla","description":"A django OpenID Connect library","archived":false,"fork":false,"pushed_at":"2024-07-05T17:41:38.000Z","size":621,"stargazers_count":488,"open_issues_count":85,"forks_count":177,"subscribers_count":20,"default_branch":"main","last_synced_at":"2025-05-03T20:28:28.582Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://mozilla-django-oidc.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mozilla.png","metadata":{"files":{"readme":"README.rst","changelog":"HISTORY.rst","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.rst","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-10-11T09:37:45.000Z","updated_at":"2025-04-25T12:51:56.000Z","dependencies_parsed_at":"2024-04-20T20:46:42.635Z","dependency_job_id":"509040f6-2901-47d4-86be-d14ccc96806c","html_url":"https://github.com/mozilla/mozilla-django-oidc","commit_stats":{"total_commits":328,"total_committers":59,"mean_commits":5.559322033898305,"dds":0.7317073170731707,"last_synced_commit":"2c2334fdc9b2fc72a492b5f0e990b4c30de68363"},"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozilla%2Fmozilla-django-oidc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozilla%2Fmozilla-django-oidc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozilla%2Fmozilla-django-oidc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozilla%2Fmozilla-django-oidc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mozilla","download_url":"https://codeload.github.com/mozilla/mozilla-django-oidc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253775103,"owners_count":21962289,"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-08-04T04:01:19.152Z","updated_at":"2025-05-15T02:10:29.400Z","avatar_url":"https://github.com/mozilla.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"===================\nmozilla-django-oidc\n===================\n\n.. image:: https://badge.fury.io/py/mozilla-django-oidc.svg\n   :target: https://badge.fury.io/py/mozilla-django-oidc\n\n.. image:: https://codecov.io/gh/mozilla/mozilla-django-oidc/branch/main/graph/badge.svg\n   :target: https://codecov.io/gh/mozilla/mozilla-django-oidc\n\n.. image:: https://circleci.com/gh/mozilla/mozilla-django-oidc/tree/main.svg?style=svg\n   :target: https://circleci.com/gh/mozilla/mozilla-django-oidc/tree/main\n\nA lightweight authentication and access management library for integration with OpenID Connect enabled authentication services.\n\n\nDocumentation\n-------------\n\nThe full documentation is at `\u003chttps://mozilla-django-oidc.readthedocs.io\u003e`_.\n\n\nDesign principles\n-----------------\n\n* Keep it as minimal/lightweight as possible\n* Store as few authn/authz artifacts as possible\n* Allow custom functionality by overriding the authentication backend\n* Mainly support OIDC authorization code flow\n* Allow shipping Mozilla-centric authn/authz features\n* Test against all supported Python/Django version\n* E2E tested and audited by `Mozilla InfoSec \u003chttps://infosec.mozilla.org/\u003e`_\n\n\nRunning Unit Tests\n-------------------\n\nUse ``tox`` to run as many different versions of Python you have. If you\ndon't have ``tox`` installed (and executable) already you can either\ninstall it in your system Python or `\u003chttps://pypi.python.org/pypi/pipsi\u003e`_.\nOnce installed, simply execute in the project root directory.\n\n.. code-block:: shell\n\n    $ tox\n\n``tox`` will do the equivalent of installing virtual environments for every\ncombination mentioned in the ``tox.ini`` file. If your system, for example,\ndoesn't have ``python3.4`` those ``tox`` tests will be skipped.\n\nFor a faster test-rinse-repeat cycle you can run tests in a specific\nenvironment with a specific version of Python and specific version of\nDjango of your choice. Here is such an example:\n\n\n.. code-block:: shell\n\n    $ virtualenv -p /path/to/bin/python3.8 venv\n    $ source venv\n    (venv) $ pip install -r requirements/requirements_dev.txt\n    (venv) $ DJANGO_SETTINGS_MODULE=tests.settings django-admin test\n\nMeasuring code coverage, continuing the steps above:\n\n.. code-block:: shell\n\n    (venv) $ pip install coverage\n    (venv) $ DJANGO_SETTINGS_MODULE=tests.settings coverage run --source mozilla_django_oidc `which django-admin` test\n    (venv) $ coverage report\n    (venv) $ coverage html\n    (venv) $ open htmlcov/index.html\n\nLocal development\n-----------------\n\nThe local development setup is based on Docker so you need the following installed in your system:\n\n* `docker`\n* `docker-compose`\n\nYou will also need to edit your ``hosts`` file to resolve ``testrp`` and ``testprovider`` hostnames to ``127.0.0.1``.\n\nRunning test services\n=====================\n\nTo run the `testrp` and `testprovider` instances run the following:\n\n.. code-block:: shell\n\n   (venv) $ docker-compose up -d testprovider testrp\n\nThen visit the testing django app on: ``http://testrp:8081``.\n\nThe library source code is mounted as a docker volume and source code changes are reflected directly in.\nIn order to test a change you need to restart the ``testrp`` service.\n\n.. code-block:: shell\n\n   (venv) $ docker-compose stop testrp\n   (venv) $ docker-compose up -d testrp\n\nRunning integration tests\n=========================\n\nIntegration tests are mounted as a volume to the docker containers. Tests can be run using the following command:\n\n.. code-block:: shell\n\n   (venv) $ docker-compose run --service-ports testrunner\n\nLinting\n-------\n\nAll code is checked with `\u003chttps://pypi.python.org/pypi/flake8\u003e`_ in\ncontinuous integration. To make sure your code still passes all style guides\ninstall ``flake8`` and check:\n\n.. code-block:: shell\n\n    $ flake8 mozilla_django_oidc tests\n\n.. note::\n\n    When you run ``tox`` it also does a ``flake8`` run on the main package\n    files and the tests.\n\nYou can also run linting with ``tox``:\n\n.. code-block:: shell\n\n    $ tox -e lint\n\nFinally you can use pre-commit hooks to run linting and formatting before you commit your code:\n\n.. code-block:: shell\n\n  (venv)  $ pre-commit install\n\n\nReleasing a new version\n------------------------\n\n``mozilla-django-oidc`` releases are hosted in `PyPI \u003chttps://pypi.python.org/pypi/mozilla-django-oidc\u003e`_.\nHere are the steps you need to follow in order to push a new release:\n\n* Make sure that ``HISTORY.rst`` is up-to-date focusing mostly on backwards incompatible changes.\n\n  Security vulnerabilities should be clearly marked in a \"Security issues\" section along with\n  a level indicator of:\n\n  * High: vulnerability facilitates data loss, data access, impersonation of admin, or allows access\n    to other sites or components\n\n    Users should upgrade immediately.\n\n  * Medium: vulnerability endangers users by sending them to malicious sites or stealing browser\n    data.\n\n    Users should upgrade immediately.\n\n  * Low: vulnerability is a nuissance to site staff and/or users\n\n    Users should upgrade.\n\n* Bump the project version and create a commit for the new version.\n\n  * You can use ``bumpversion`` for that. It is a tool to automate this procedure following the `semantic versioning scheme \u003chttp://semver.org/\u003e`_.\n\n    * For a patch version update (eg 0.1.1 to 0.1.2) you can run ``bumpversion patch``.\n    * For a minor version update (eg 0.1.0 to 0.2.0) you can run ``bumpversion minor``.\n    * For a major version update (eg 0.1.0 to 1.0.0) you can run ``bumpversion major``.\n\n* Create a `signed tag \u003chttps://git-scm.com/book/tr/v2/Git-Tools-Signing-Your-Work\u003e`_ for that version\n\n  Example::\n\n      git tag -s 0.1.1 -m \"Bump version: 0.1.0 to 0.1.1\"\n\n* Push the signed tag to Github\n\n  Example::\n\n      git push origin 0.1.1\n\nThe release is pushed automatically to PyPI using a travis deployment hook on every new tag.\n\n\nLicense\n-------\n\nThis software is licensed under the MPL 2.0 license. For more info check the LICENSE file.\n\n\nCredits\n-------\n\nTools used in rendering this package:\n\n*  Cookiecutter_\n*  `cookiecutter-djangopackage`_\n\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`cookiecutter-djangopackage`: https://github.com/pydanny/cookiecutter-djangopackage\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmozilla%2Fmozilla-django-oidc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmozilla%2Fmozilla-django-oidc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmozilla%2Fmozilla-django-oidc/lists"}