{"id":21825918,"url":"https://github.com/pior/pyramid_debugauth","last_synced_at":"2025-03-21T11:48:11.208Z","repository":{"id":62582902,"uuid":"120982245","full_name":"pior/pyramid_debugauth","owner":"pior","description":"Debug Authentication Policy for Pyramid","archived":false,"fork":false,"pushed_at":"2018-02-10T05:19:40.000Z","size":31,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-04T19:48:19.787Z","etag":null,"topics":["pyramid-framework"],"latest_commit_sha":null,"homepage":"https://pypi.python.org/pypi/pyramid_debugauth","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/pior.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.rst","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-02-10T03:55:32.000Z","updated_at":"2018-02-10T03:56:51.000Z","dependencies_parsed_at":"2022-11-03T22:01:52.247Z","dependency_job_id":null,"html_url":"https://github.com/pior/pyramid_debugauth","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pior%2Fpyramid_debugauth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pior%2Fpyramid_debugauth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pior%2Fpyramid_debugauth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pior%2Fpyramid_debugauth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pior","download_url":"https://codeload.github.com/pior/pyramid_debugauth/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244795423,"owners_count":20511519,"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":["pyramid-framework"],"created_at":"2024-11-27T18:02:59.772Z","updated_at":"2025-03-21T11:48:11.179Z","avatar_url":"https://github.com/pior.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"=================\nPyramid_debugauth\n=================\n\nDebug Authentication Policy for Pyramid. Provide a simple and standard way to\ndefine the pyramid principals from the HTTP client.\n\n**Warning**: This pyramid is totally unsafe for production and should be\nrestricted to debug usage / development phase.\n\n* PyPI: https://pypi.python.org/pypi/pyramid_debugauth\n* Code: https://github.com/pior/pyramid_debugauth\n* |travis-ci|\n\n.. |travis-ci| image::\n   https://travis-ci.org/pior/pyramid_debugauth.svg?branch=master\n   :target: https://travis-ci.org/pior/pyramid_debugauth\n   :alt: Tests on Travis-CI\n\n\n\nInstallation\n============\n\nInstall using setuptools, e.g. (within a virtualenv)::\n\n  $ pip install pyramid_debugauth\n\n\nSetup\n=====\n\nOnce ``pyramid_debugauth`` is installed, you can define a authentication policy\nwith ``config.set_authentication_policy``.\n\nIn your Pyramid project:\n\n.. code-block:: python\n\n   from pyramid.authorization import ACLAuthorizationPolicy\n   from pyramid_debugauth import DebugAuthenticationPolicy\n\n   config = Configurator(.....)\n   config.set_authentication_policy(DebugAuthenticationPolicy())\n   config.set_authorization_policy(ACLAuthorizationPolicy())\n\n\nUsage\n=====\n\nThe DebugAuthenticationPolicy allows a client to impersonate any user and\nspecify any number of principals desired using the standard *Authorization*\nhttp header and a non-standard auth-scheme *Debug* (:rfc:`7235`):\n\n``Authorization: Debug user_id [principal_1] [principal_2] ...``\n\nWith common http clients:\n\n.. code-block:: bash\n\n   $ curl http://localhost:6543 -H 'Authorization: Debug bob admin'\n\n   $ http http://localhost:6543 'Authorization: Debug bob admin'\n\n\nOr using a non-standard *authorization* query parameter:\n\n``http://localhost:6543/protected?authorization=debug%20user_id%20principal_1``\n\nWith common http clients:\n\n.. code-block:: bash\n\n   $ curl http://localhost:6543?authorization=debug%20bob%20admin\n\n   $ http http://localhost:6543?authorization=debug\\ bob\\ admin\n\n\nDevelopment\n===========\n\nRunning tests::\n\n   $ virtualenv venv\n   $ . venv/bin/activate\n   (venv)$ pip install -e .[dev]\n   (venv)$ nosetests\n\nRelease\n-------\n\n::\n\n   $ python setup.py sdist bdist_wheel\n   ...\n\n   $ twine upload dist/*\n   ...\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpior%2Fpyramid_debugauth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpior%2Fpyramid_debugauth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpior%2Fpyramid_debugauth/lists"}