{ "info": { "author": "Pior Bastida", "author_email": "pior@pbastida.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Framework :: Pyramid", "Intended Audience :: Developers", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Internet :: WWW/HTTP :: WSGI" ], "description": "====================\nPyramid Google Login\n====================\n\nPyramid authentication policy for Google login (OAuth2 server-side flow)\n\nThis extension doesn't configure any authentication policy. You are responsible\nof setting the proper security configuration in your Pyramid application. When\nauthenticated by Google, this extension calls the method\n``pyramid.security.remember`` and assume the authentication policy will\nremember the user identity.\n\n* PyPI: https://pypi.python.org/pypi/pyramid_google_login\n* Code: https://github.com/ludia/pyramid_google_login\n* Tests: |travis|\n\n.. |travis| image::\n https://travis-ci.org/ludia/pyramid_google_login.svg?branch=master\n :target: https://travis-ci.org/ludia/pyramid_google_login\n :alt: Tests on TravisCI\n\n\nInstallation\n============\n\nInstall using setuptools, e.g. (within a virtualenv)::\n\n $ pip install pyramid_google_login\n\n\nSetup: Application\n==================\n\nOnce ``pyramid_google_login`` is installed, you must use the ``config.include``\nmechanism to include it into your Pyramid project's configuration. In your\nPyramid project's ``__init__.py``:\n\n.. code-block:: python\n\n config = Configurator(.....)\n config.include('pyramid_google_login')\n\nAlternately you can use the ``pyramid.includes`` configuration value in your\n``.ini`` file:\n\n.. code-block:: ini\n\n [app:myapp]\n pyramid.includes = pyramid_google_login\n\n\nSetup: settings\n===============\n\nMandatory settings:\n\n.. code-block:: ini\n\n security.google_login.client_id = xxxxxxx.apps.googleusercontent.com\n security.google_login.client_secret = xxxxxxxxxxxxxxxxxxxxxxxxx\n\nOptional settings:\n\n.. code-block:: ini\n\n # List of Google scopes (``email`` is automatically included)\n security.google_login.scopes = email\n\n # Set the access type to ``offline`` to get a refresh_token (default: online)\n security.google_login.access_type = online\n\n # Field used to extract the userid (generally ``email`` or ``id``)\n security.google_login.user_id_field = email\n\n # Restrict authentication to a Google Apps domain\n security.google_login.hosted_domain = example.net\n\n # Redirect destination for logged in user.\n security.google_login.landing_url = /\n security.google_login.landing_route = my_frontend_route\n security.google_login.landing_route = mymodule:static/\n\n # Add a banner on the sign in page\n security.google_login.signin_banner = Welcome on Project Euler\n\n # Add an advice on the sign in page\n security.google_login.signin_advice = Ask Dilbert for access\n\n\nSetup: Google project\n=====================\n\n- Create a project on https://console.developers.google.com\n- Create a OAuth Client ID\n\n + Choose a ``Web Application`` application type\n + Add all variants of your host in Javascript Origins\n\n * Secure and non secure url are differentiated\n * Optionally include your development host with\n ``http://localhost:6543`` rather than an ``http://127.0.0.1:6543``\n (it would be refused)\n\nNotes:\n\n- No ``Permissions`` are needed by ``pyramid_google_login`` itself.\n- Client ID parameters are heavily cached. In development, re-creating a client\n id is often the best idea.\n\n\nGeneral Usage\n=============\n\nWhen a user must be authenticated by Google, he must be sent to the\n``auth_signin`` route url. The helper method\n``pyramid_google_login.redirect_to_signin`` redirect the user to the sign in\npage. This helper is handy to specify the next url and an optional message.\n\n.. code-block:: python\n\n @forbidden_view_config()\n def unauthenticated(context, request):\n return redirect_to_signin(request, url=request.path_qs)\n\nOnce the user is authenticated, the ``UserLoggedIn`` pyramid event is\nbroadcasted. The application can perform subsequent validations, create the\nuser profile or update it.\n\nAfter that, the ``pyramid.security.remember`` helper is called.\n\nThen, the user will be redirected to an url specified by:\n\n- query parameter (signin page): ``url``\n- setting: ``security.google_login.landing_url``\n- fallback: ``/``\n\nWhen a user must be logged out, he must be directed on the ``auth_logout``\nroute url. Once logged out, he will be redirected back to the sign in page.\n\n\nOffline Usage\n=============\n\nIf you want to call the Google APIs on behalf of the user, you must store the\nOAuth2 tokens provided in the UserLoggedIn event. The ``access_token`` is\nusable for an ``expires_in`` period. Then the ``refresh_token`` must be used to\nrefresh the ``access_token``. This ``refresh_token`` is valide until the user\nrevoke the application permissions.\n\nBy default, the only scope requested is ``email`` to identify the user. To call\nother Google APIs, you must add the related scopes as this:\n\n.. code-block:: ini\n\n [app:myapp]\n\n security.google_login.scopes =\n email\n https://www.googleapis.com/auth/admin.directory.user.readonly\n\n\nEvents\n======\n\nUserLoggedIn\n------------\n\nThe user has logged in by Google.\n\nProperties:\n\n- userid\n- oauth2_token\n\n + access_token\n + expires_in\n + refresh_token\n\n- user_info\n\n + Google user_info properties...\n\nUserLoggedOut\n-------------\n\nThe user has logged out.\n\nProperties:\n\n- userid\n\n\nDevelopment\n===========\n\nThis project supports Dad (https://github.com/pior/dad).\n\nRunning tests::\n\n $ pip install -r requirements.txt\n $ nosetests\n\nRunning pylama (linters)::\n\n $ pylama\n\nCreate a new release::\n\n $ dad release 1.0\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ludia/pyramid_google_login", "keywords": "google", "license": "BSD-derived (http://www.repoze.org/LICENSE.txt)", "maintainer": "", "maintainer_email": "", "name": "pyramid_google_login", "package_url": "https://pypi.org/project/pyramid_google_login/", "platform": "", "project_url": "https://pypi.org/project/pyramid_google_login/", "project_urls": { "Homepage": "https://github.com/ludia/pyramid_google_login" }, "release_url": "https://pypi.org/project/pyramid_google_login/1.2.1/", "requires_dist": null, "requires_python": "", "summary": "Google Login for Pyramid", "version": "1.2.1" }, "last_serial": 4483287, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "a56ac205b218f80bc0ff71651a63442e", "sha256": "6a81571a285fc91cd8dd64363528ed614755aeae72d2de09d57f9d5eacdf8d09" }, "downloads": -1, "filename": "pyramid_google_login-0.1.0.tar.gz", "has_sig": false, "md5_digest": "a56ac205b218f80bc0ff71651a63442e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5052, "upload_time": "2014-11-04T16:54:11", "url": "https://files.pythonhosted.org/packages/20/e6/7321a90f76ae8223b47ff25f22416f674bb006de5fbd57882aeeeb9cbf3f/pyramid_google_login-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "7b4edb201b5c5527d62368e6767fc038", "sha256": "22e7e1ef6d3e74f694940ef3db6dcbd47e61d97ef089025a8f4bbb546185d03d" }, "downloads": -1, "filename": "pyramid_google_login-0.1.1.tar.gz", "has_sig": false, "md5_digest": "7b4edb201b5c5527d62368e6767fc038", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13480, "upload_time": "2014-11-04T17:17:24", "url": "https://files.pythonhosted.org/packages/00/6c/bca013a373fa5667c543acfd59d2d0cbdef246a15f7e09c2d19b99bdae02/pyramid_google_login-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "c6cd413e6bb1216818780f5520ac87ca", "sha256": "f4bfc92b9be1cb6d67604d684ce3c37f220ff036c9eef719e88392a35252b7fb" }, "downloads": -1, "filename": "pyramid_google_login-0.1.2.tar.gz", "has_sig": false, "md5_digest": "c6cd413e6bb1216818780f5520ac87ca", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13494, "upload_time": "2014-11-04T17:24:20", "url": "https://files.pythonhosted.org/packages/c4/43/f7949a389f5f762c633e5a20695d79daa9c2dcd04ef265b221c74e690e52/pyramid_google_login-0.1.2.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "7773bd7d08f634752e19d80b2ec4b099", "sha256": "7c67843cb997e876677e9ba27286b7bac6f00a0254837ef8c1b16507b3c823e2" }, "downloads": -1, "filename": "pyramid_google_login-0.2.0.tar.gz", "has_sig": false, "md5_digest": "7773bd7d08f634752e19d80b2ec4b099", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13684, "upload_time": "2014-11-04T21:05:37", "url": "https://files.pythonhosted.org/packages/57/f3/4354da62405e21f905771e1fd0dbf3a41517c4ecc1b47c3e6d22275007c0/pyramid_google_login-0.2.0.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "2ac21f68d69ff42b651ead5b4d3ba9f4", "sha256": "b9322e45afb849f8f32c26e6c46cedbf2713a425c12ed405c329057541f36a4b" }, "downloads": -1, "filename": "pyramid_google_login-0.4.0.tar.gz", "has_sig": false, "md5_digest": "2ac21f68d69ff42b651ead5b4d3ba9f4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14271, "upload_time": "2014-11-06T14:17:38", "url": "https://files.pythonhosted.org/packages/07/03/c016ffc69e6fbcd61c7b9615ac7cc53a203b463867a94961fd5405ea8ebf/pyramid_google_login-0.4.0.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "91c237f75597d012ed164ed88d13786f", "sha256": "1f8e4835d02d88c837f882d94b1071c8b022763e272f00f18be461cdbce29316" }, "downloads": -1, "filename": "pyramid_google_login-0.5.0.tar.gz", "has_sig": false, "md5_digest": "91c237f75597d012ed164ed88d13786f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14324, "upload_time": "2014-11-06T16:31:35", "url": "https://files.pythonhosted.org/packages/f0/f7/4c14486e57e464de0040e847ba4c4f3b1a95d03fd18bdacf12b37ea3c59b/pyramid_google_login-0.5.0.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "d15d66bf577cbec50f672531304f48c3", "sha256": "cec8c751b9735133894316f9158b5bdebac5573d0e35624dee18b41a6a85af24" }, "downloads": -1, "filename": "pyramid_google_login-1.0.0.tar.gz", "has_sig": false, "md5_digest": "d15d66bf577cbec50f672531304f48c3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15894, "upload_time": "2014-11-26T20:29:08", "url": "https://files.pythonhosted.org/packages/ea/87/5558a3069d7429c79ed74f319681ff629dee7717c6ad0a11c97de38fc831/pyramid_google_login-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "4cdcbdd44ae2749060b712811209ea7e", "sha256": "f0c5f6c5d430216955c86e6e5768ba6875f9bb24659469c40f3d8e9ab16c3c07" }, "downloads": -1, "filename": "pyramid_google_login-1.0.1.tar.gz", "has_sig": false, "md5_digest": "4cdcbdd44ae2749060b712811209ea7e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16461, "upload_time": "2014-12-03T20:24:01", "url": "https://files.pythonhosted.org/packages/e3/e4/239c54c23c9a0abd9474286826fb50bba7178f81882216038e477543f166/pyramid_google_login-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "5b853f4e2f869c8f38d446273c44669f", "sha256": "7b325cd14f333bf936a2ae14d9adee1f758fd07bd4593b9467cbbc271dfc697a" }, "downloads": -1, "filename": "pyramid_google_login-1.0.2.tar.gz", "has_sig": false, "md5_digest": "5b853f4e2f869c8f38d446273c44669f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16498, "upload_time": "2014-12-19T18:26:02", "url": "https://files.pythonhosted.org/packages/76/c2/abc77cfde3b6e1961414306fe3243a4d7ba205876a83f952128489c86b03/pyramid_google_login-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "8576fa95a7c25557939eb15e4b0b7848", "sha256": "b5b2002faf8caa4d94372ef119be83e8b19dfe0bd44740dd7bfaea2d4bfdcd41" }, "downloads": -1, "filename": "pyramid_google_login-1.0.3.tar.gz", "has_sig": false, "md5_digest": "8576fa95a7c25557939eb15e4b0b7848", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16555, "upload_time": "2015-02-20T17:28:52", "url": "https://files.pythonhosted.org/packages/eb/a0/4df4de75d3f9cc4863c87271224541f2b70c68ce52678ab2ef29868b23e9/pyramid_google_login-1.0.3.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "217980739723ba5e429966415165ce7d", "sha256": "1b7252abd558f175dec4c1961407030c7eca9e3b9f47053ad480ca3b4181fb80" }, "downloads": -1, "filename": "pyramid_google_login-1.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "217980739723ba5e429966415165ce7d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 23194, "upload_time": "2016-12-07T16:58:41", "url": "https://files.pythonhosted.org/packages/29/b4/60a401c8e63d07e8740ff5e189612cbec6c4fe07154c385b1856d5d9105a/pyramid_google_login-1.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "21e547a7393c6044e9c14077fad5729b", "sha256": "55c0d0fa38816b52fdec7b2cdede1adce198a64073b6af581867e4a12ac13e55" }, "downloads": -1, "filename": "pyramid_google_login-1.1.0.tar.gz", "has_sig": false, "md5_digest": "21e547a7393c6044e9c14077fad5729b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17868, "upload_time": "2016-12-07T16:58:43", "url": "https://files.pythonhosted.org/packages/5e/d8/3ab46e87a603147e87268bc24a2f1ed08f9b5f2bb1b1abc4126f970a86c8/pyramid_google_login-1.1.0.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "450de963b3bf115610e6c098d33856a4", "sha256": "5cafa484d1f96a9c4dfc4c1888fa72d6a32ac299433b7bb3eb1f5181f4d6febf" }, "downloads": -1, "filename": "pyramid_google_login-1.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "450de963b3bf115610e6c098d33856a4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 20185, "upload_time": "2018-04-13T00:36:05", "url": "https://files.pythonhosted.org/packages/37/13/d4493704e1d2d41faaa2e3a0b096fd8949acffa1855cc758447fc21e07e3/pyramid_google_login-1.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "92acdb025fc8a2a4bcb29e206a0479b6", "sha256": "16c328fc587a0ab4bc969fe69fce3d7f2e224e857843482716fdc5e735877505" }, "downloads": -1, "filename": "pyramid_google_login-1.2.0.tar.gz", "has_sig": false, "md5_digest": "92acdb025fc8a2a4bcb29e206a0479b6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18262, "upload_time": "2018-04-13T00:36:06", "url": "https://files.pythonhosted.org/packages/ad/b8/b9f9f40fe27e13b9af3c59781f44225102b7d0bfdcc881826e543b67b6b0/pyramid_google_login-1.2.0.tar.gz" } ], "1.2.1": [ { "comment_text": "", "digests": { "md5": "c84ae93bb9c010d46b82184da3e20a70", "sha256": "b249aa300b9a2ea6614d05fd8733da8b1cd6969ee7be91ffd41e83cd735e1575" }, "downloads": -1, "filename": "pyramid_google_login-1.2.1.tar.gz", "has_sig": false, "md5_digest": "c84ae93bb9c010d46b82184da3e20a70", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18016, "upload_time": "2018-11-13T21:33:52", "url": "https://files.pythonhosted.org/packages/43/e8/b2d722fe074c519a6fb637320172455745ad49ce1e55323b0c22178c0127/pyramid_google_login-1.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c84ae93bb9c010d46b82184da3e20a70", "sha256": "b249aa300b9a2ea6614d05fd8733da8b1cd6969ee7be91ffd41e83cd735e1575" }, "downloads": -1, "filename": "pyramid_google_login-1.2.1.tar.gz", "has_sig": false, "md5_digest": "c84ae93bb9c010d46b82184da3e20a70", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18016, "upload_time": "2018-11-13T21:33:52", "url": "https://files.pythonhosted.org/packages/43/e8/b2d722fe074c519a6fb637320172455745ad49ce1e55323b0c22178c0127/pyramid_google_login-1.2.1.tar.gz" } ] }