{ "info": { "author": "Hanne Moa", "author_email": "hanne.moa@uninett.no", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Framework :: Flask", "Framework :: Pyramid", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Internet :: WWW/HTTP", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Utilities" ], "description": "python-dataporten-auth\n======================\n\nDataporten_ is an authentication, authorization and API platform\nfor higher and lower education and research in Norway. Dataporten\noffers authentication of users to applications using OAuth 2.0 and\nthe OpenID Connect.\n\nDataporten-auth is a client for dataporten that depends on\nsocial-auth-core_.\n\nThis library is not compatible with the pre-refactor\npython-social-auth_, see any version prior to 2.0.x for that.\nFurthermore, this is now a Python 3 based project; No attempts\nhave been made to make it backwards compatible with Python 2.\n\nIf you are using the previous incarnation of ``python-dataporten-auth``:\n``dataporten-auth``, see `Upgrading from dataporten-auth`_.\n\n\nInstallation\n------------\n\nInstall with ``pip install python-dataporten-auth`` or by downloading the\nsource and running ``setup.py``.\n\n\n\nUsage\n-----\n\nSet up an application at Dataporten\n...................................\n\nThere needs to exist an entry for your site/app at dataporten. Log\nin to `dataporten's dashboard`_ and create an application. The\nentry needs one or more redirect uris.\n\nYou can have several redirect-uris, and you will be needing at\nleast one per plugin used.\n\nThe redirect uri is of the form ``:////``,\nwhere ```` is one of ``http`` or ``https``, ````\nis the domain name of your site and an optional path, and the\n```` is plugin-dependent. See the examples under\n**Plugins**.\n\nSet up your site\n................\n\nYou'll need to set the client id and client secret generated by\nDataporten in the settings of your app/site.\n\n\nBoth the name of the settings and the redirect uris depend on the\nplugins used. Add at least one of the plugins below.\n\nSee `social's documentation`_ for more.\n\nDjango\n......\n\nIn your ``settings.py``:\n\n* Add ``'social_django'`` to ``INSTALLED_APPS``.\n* Add one or more of the plugin names below to the start of\n ``AUTHENTICATION_BACKENDS``. If you're also using user-models\n \u00e0 la Django, ``'django.contrib.auth.backends.ModelBackend'``\n must be in the same list, following the plugins.\n* Set ``SOCIAL_AUTH_DATAPORTEN_FEIDE_SSL_PROTOCOL`` to ``True`` to\n use SSL. * ``SOCIAL_AUTH_LOGIN_REDIRECT_URL``,\n ``SOCIAL_AUTH_NEW_USER_REDIRECT_URL`` and\n ``SOCIAL_AUTH_REDIRECT_IS_HTTPS`` will have to be set depending\n on the needs of your site.\n* If you use the Django admin, you might want to set\n ``SOCIAL_AUTH_ADMIN_USER_SEARCH_FIELDS``, for instance to\n ``['username', 'email']``.\n\nAlso see the settings in ``src\\demosite\\settings.py`` in the source.\n\nIn your site's ``urls.py``, include:\n\n``url(PREFIX, include('social_django.urls', namespace='social')),``\n\n... where PREFIX is a string to start off the urls with. Empty\nstring, ``''``, is fine.\n\nUpgrading from dataporten-auth\n------------------------------\n\nSee `PSA's official migration document`_, here follows a summary.\n\n1. Install ``python-social-auth`` version 0.2.21.\n2. Run migrations.\n3. Uninstall ``dataporten-auth``\n4. Install ``python-dataporten-auth``.\n5. Install ``social-auth-app-django``.\n6. In your ``urls.py`` rename ``'social.apps.django_app.urls'`` to ``'social_django.urls'``.\n7. In your ``settings.py``, in this order:\n\n 1. Rename ``'social.apps.django_app.default'`` to ``'social_django'``.\n 2. Replace all mentions of ``'social.*'`` with ``'social_core.*'``.\n 3. Replace all mentions of ``psa`` with ``social``.\n\n8. Run migrations for ``social_django``.\n9. Uninstall ``python-social-auth``.\n\nPlugins\n-------\n\ndataporten.social.DataportenOAuth2\n..................................\n\nPlugin name\n ``dataporten.social.DataportenOAuth2``\n\nSettings\n Client id: ``SOCIAL_AUTH_DATAPORTEN_KEY``\n\n Client secret: ``SOCIAL_AUTH_DATAPORTEN_SECRET``\n\nScopes needed\n ``userid`` and ``profile``, this is the default.\n\nUsername generated:\n Unique, alphanumeric string. You might want to let users\n change this generated username. The plugin only cares that a\n username exists and won't change the username back.\n\nRedirect-uri ends with\n /complete/dataporten/\n\nExample redirect uri:\n http://127.0.0.1/complete/dataporten/\n\ndataporten.social.DataportenEmailOAuth2\n.......................................\n\nPlugin name\n ``dataporten.social.DataportenEmailOAuth2``\n\nSettings\n Client id: ``SOCIAL_AUTH_DATAPORTEN_EMAIL_KEY``\n\n Client secret: ``SOCIAL_AUTH_DATAPORTEN_EMAIL_SECRET``\n\nScopes needed\n ``email``, this must be explicitly allowed in the dashboard.\n\nUsername generated:\n From email-address\n\nRedirect-uri ends with\n /complete/dataporten_email/\n\nExample redirect uri:\n https://supersites.example.net/mysite/complete/dataporten_email/\n\ndataporten.social.DataportenFeideOAuth2\n.......................................\n\nPlugin name\n ``dataporten.social.DataportenFeideOAuth2``\n\nSettings\n Client id: ``SOCIAL_AUTH_DATAPORTEN_FEIDE_KEY``\n\n Client secret: ``SOCIAL_AUTH_DATAPORTEN_FEIDE_SECRET``\n\nScopes needed\n ``userid-feide``, this must be explicitly allowed in the dashboard.\n\nUsername generated:\n From the Feide attribute ``eduPersonPrincipalName``, which looks\n like an email address.\n\nRedirect-uri ends with\n /complete/dataporten_feide/\n\nExample redirect uri:\n https://example.com/cheatsheet/complete/dataporten_feide/\n\n\n\nDemo\n----\n\nThe Demo needs Django 1.8 or newer.\n\n1. Get the source code\n2. Install dependencies: ``pip install -r requirements/demo.txt``\n3. Make an application at dataporten\n4. Edit the settings-file to set ``SOCIAL_AUTH_DATAPORTEN_KEY`` and ``SOCIAL_AUTH_DATAPORTEN_SECRET``\n5. Set three redirect-uris, all starting with ``http://127.0.0.1:8000``\n6. Run ``python mange.py runserver``\n7. Visit http://127.0.0.1:8000 in a fresh browser. Log out doesn't work (yet),\n so to reset, delete the file ``db.sqlite3`` and run ``python mange.py runserver`` again\n\nOptionally, you can add other ``social`` plugins as well.\n\n\n.. _Dataporten: https://docs.dataporten.no/\n.. _social-auth-core: https://python-social-auth.readthedocs.io/en/latest/\n.. _`dataporten's dashboard`: https://dashboard.dataporten.no/\n.. _social's documentation: https://python-social-auth.readthedocs.io/en/latest/\n.. _python-social-auth: https://pypi.python.org/pypi/python-social-auth\n.. _`PSA's official migration document`: https://github.com/omab/python-social-auth/blob/master/MIGRATING_TO_SOCIAL.md\n\n\n\n:Version: 2.0.0", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/UNINETT/python-dataporten-auth", "keywords": "django,oauth2", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "python-dataporten-auth", "package_url": "https://pypi.org/project/python-dataporten-auth/", "platform": "any", "project_url": "https://pypi.org/project/python-dataporten-auth/", "project_urls": { "Homepage": "https://github.com/UNINETT/python-dataporten-auth" }, "release_url": "https://pypi.org/project/python-dataporten-auth/2.0.0/", "requires_dist": [ "social-auth-core" ], "requires_python": "", "summary": "A plugin for python-social-auth to authenticate with dataporten", "version": "2.0.0" }, "last_serial": 2959106, "releases": { "2.0.0": [ { "comment_text": "", "digests": { "md5": "7b5d350ced91eaed8098edb4a47e7b7d", "sha256": "fff2e6416a7fc924fd58d1c682dced0bac4c86be3ab35727a4d75c2a1a036ee7" }, "downloads": -1, "filename": "python_dataporten_auth-2.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7b5d350ced91eaed8098edb4a47e7b7d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8625, "upload_time": "2017-06-19T10:37:41", "url": "https://files.pythonhosted.org/packages/34/46/36d973cb02f8af6f248dd2ca06532459185cec14bcb69982280d0fb711a5/python_dataporten_auth-2.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "330d327984e1ce7a78a05233583476a6", "sha256": "2a4d9651ac008195133480e83e895d888bc1f9a68abc118601d21c41f8f90e73" }, "downloads": -1, "filename": "python-dataporten-auth-2.0.0.tar.gz", "has_sig": false, "md5_digest": "330d327984e1ce7a78a05233583476a6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6223, "upload_time": "2017-06-19T10:37:43", "url": "https://files.pythonhosted.org/packages/6d/d1/d07d332826f071a43dc573fafee03104c4d02bbac6bbf53c1e1378c7ea12/python-dataporten-auth-2.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7b5d350ced91eaed8098edb4a47e7b7d", "sha256": "fff2e6416a7fc924fd58d1c682dced0bac4c86be3ab35727a4d75c2a1a036ee7" }, "downloads": -1, "filename": "python_dataporten_auth-2.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7b5d350ced91eaed8098edb4a47e7b7d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8625, "upload_time": "2017-06-19T10:37:41", "url": "https://files.pythonhosted.org/packages/34/46/36d973cb02f8af6f248dd2ca06532459185cec14bcb69982280d0fb711a5/python_dataporten_auth-2.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "330d327984e1ce7a78a05233583476a6", "sha256": "2a4d9651ac008195133480e83e895d888bc1f9a68abc118601d21c41f8f90e73" }, "downloads": -1, "filename": "python-dataporten-auth-2.0.0.tar.gz", "has_sig": false, "md5_digest": "330d327984e1ce7a78a05233583476a6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6223, "upload_time": "2017-06-19T10:37:43", "url": "https://files.pythonhosted.org/packages/6d/d1/d07d332826f071a43dc573fafee03104c4d02bbac6bbf53c1e1378c7ea12/python-dataporten-auth-2.0.0.tar.gz" } ] }