{ "info": { "author": "Geoff Low", "author_email": "glow@mdsol.com", "bugtrack_url": null, "classifiers": [ "Framework :: Flask", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "# Flask MAuth\n\nFlask-MAuth is a authentication library for Python server applications receiving MAuth signed requests. \n\nIt is a partial Python port of the code in the [mauth-client-ruby](https://github.com/mdsol/mauth-client-ruby) repository.\n\nIt uses the upstream [requests-mauth](https://github.com/mdsol/requests-mauth) client library. We need to decide whether to move the code into the local repository. \n\nGetting Started\n===============\n\nAn important component is that the Authenticator needs its own set of credentials, as it needs access to the MAuth Server to authenticate requests.\n\nYou will need to raise a ticket to register a public key and get an *APP_UUID* for the environment of your application. Note that the *MAUTH_BASE_URL* will probably\ninclude the environment, e.g. *https://mauth-sandbox.imedidata.net*\n\n\nInstallation\n------------\n\nInstall using pip::\n\n $ pip install flask-mauth\n\n\nOr directly from GitHub::\n\n $ pip install git+https://github.com/mdsol/flask-mauth.git\n\nThis will also install the dependencies\n\nUsage\n-----\n\nTo use *Flask-MAuth* you will need to create an application instance and supply the required configuration options::\n\n```python\n from flask import Flask\n from flask_mauth import MAuthAuthenticator\n\n app = Flask(\"Some Sample App\")\n app.config['MAUTH_APP_UUID'] = '671785CD-15CE-458A-9779-8132C8F60F04' # This will be the APP UUID for your application\n app.config['MAUTH_KEY_DATA'] = key_text # This will be the content of the Private Key\n app.config['MAUTH_BASE_URL'] = \"https://mauth-sandbox.imedidata.net\" # The MAuth Server Base URL\n app.config['MAUTH_VERSION'] = \"v2\" # This defaults to v2 and can be left out\n app.config['MAUTH_MODE'] = \"local\" # This should be either 'local' or 'remote'\n mauth = MAuthAuthenticator()\n mauth.init_app(app)\n```\nTo specify routes that need to be authenticated use the `requires_authentication` decorator::\n\n```python\n from flask_mauth import MAuthAuthenticator, requires_authentication\n\n @app.route(\"/some/private/route\", methods=[\"GET\"])\n @requires_authentication\n def private_route():\n return 'Wibble'\n\n @app.route(\"/app_status\", methods=[\"GET\"])\n def app_status():\n return 'OK'\n\n```\n\n\nDevelopment and Testing\n-----------------------\nWe recommend the use of `virtualenv` or `pyenv` for development.\n\nWe use [tox](https://tox.readthedocs.io/en/latest/) and [pyenv](https://github.com/yyuu/pyenv) to run the tests::\n\n $ brew install pyenv pyenv-virtualenv # Follow the instructions to configure the enviroment\n $ pip install tox tox-pyenv\n $ pyenv local 2.7.13 3.5.2 3.6.0 # take the most recent versions for these\n $ tox\n\nTox will output the status of the tests, as well as coverage data. \n\nBuild Status (Travis-CI)\n------------\n* develop - [![Build Status](https://travis-ci.org/mdsol/flask-mauth.svg?branch=develop)](https://travis-ci.org/mdsol/flask-mauth.svg?branch=develop)\n* master - [![Build Status](https://travis-ci.org/mdsol/flask-mauth.svg?branch=master)](https://travis-ci.org/mdsol/flask-mauth.svg?branch=master)", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://www.github.com/mdsol/flask-mauth/", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "Flask-MAuth", "package_url": "https://pypi.org/project/Flask-MAuth/", "platform": "any", "project_url": "https://pypi.org/project/Flask-MAuth/", "project_urls": { "Homepage": "https://www.github.com/mdsol/flask-mauth/" }, "release_url": "https://pypi.org/project/Flask-MAuth/1.1/", "requires_dist": [ "Flask", "six", "rsa", "cachetools", "requests", "requests-mauth", "sphinx; extra == 'docs'" ], "requires_python": "", "summary": "MAuth Client and Server Library for MAuth", "version": "1.1" }, "last_serial": 2680845, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "0f5e3bb4c416f6207d2a7d26d8291a91", "sha256": "59443c16b43b5ca7305e13e7c3e68c6984fb8103e176c99f4ecad01c78b9b11b" }, "downloads": -1, "filename": "Flask_MAuth-0.1-py2.7.egg", "has_sig": false, "md5_digest": "0f5e3bb4c416f6207d2a7d26d8291a91", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 22404, "upload_time": "2017-01-31T21:25:39", "url": "https://files.pythonhosted.org/packages/16/86/4996bd7c230c2a845eb823c798512ee3ee96084be8682a9afbb3be34581f/Flask_MAuth-0.1-py2.7.egg" } ], "1.0": [ { "comment_text": "", "digests": { "md5": "586d70e41f59ee5965ca7ee9fc5f805f", "sha256": "79758c65467e45b7c382a8d5ccd212d7652251105dd6a3c5ff749dccb7c7e976" }, "downloads": -1, "filename": "Flask_MAuth-1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "586d70e41f59ee5965ca7ee9fc5f805f", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 11817, "upload_time": "2017-01-31T21:25:34", "url": "https://files.pythonhosted.org/packages/43/09/9650cba6d3dc48e24eaa5f0de34342ed8553c22e641def9fea94fd3948ec/Flask_MAuth-1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "18b7f044d5aa8f1296306486d9a98dff", "sha256": "392b5350bc25dcdcaa66ec2d1b1139adf9382185f48342ee96d9967ea561658a" }, "downloads": -1, "filename": "Flask-MAuth-1.0.tar.gz", "has_sig": false, "md5_digest": "18b7f044d5aa8f1296306486d9a98dff", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21644, "upload_time": "2017-01-31T21:25:36", "url": "https://files.pythonhosted.org/packages/d5/93/f861b825076181904113c40d33cc659b0701f5343b37c2ae7e892332accc/Flask-MAuth-1.0.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "908a31a712f27dd88a8959c2097ccb84", "sha256": "2b73487fdd5a77660073f456ef1bd70b72586e7dea219ce77125fa451076c1c5" }, "downloads": -1, "filename": "Flask_MAuth-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "908a31a712f27dd88a8959c2097ccb84", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 11849, "upload_time": "2017-01-31T21:52:08", "url": "https://files.pythonhosted.org/packages/f1/7c/d807184153d0d05eb5d6ce34f51ae58c01e17e9cb3a4edadbe9619ef2620/Flask_MAuth-1.0.0-py2.py3-none-any.whl" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "c1e4caa41563b47ed7cc0485cf78ba7a", "sha256": "6f2935f7d472946ec6bc1016699d14aac262623a7f9c3867c0e70cc34591f2ab" }, "downloads": -1, "filename": "Flask_MAuth-1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "c1e4caa41563b47ed7cc0485cf78ba7a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 14529, "upload_time": "2017-03-03T16:53:09", "url": "https://files.pythonhosted.org/packages/e1/c1/7b0faa8bb448819321a47cacada8e7a7d7f04fb173549d65e5d2e6ff40d2/Flask_MAuth-1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a78b6364222999a385cdabd0649d8b36", "sha256": "6e419a2b3593741b36e00ca1acfe586f98ea25d2d44fabe14dc8bddf48479a54" }, "downloads": -1, "filename": "Flask-MAuth-1.1.tar.gz", "has_sig": false, "md5_digest": "a78b6364222999a385cdabd0649d8b36", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24597, "upload_time": "2017-03-03T16:53:11", "url": "https://files.pythonhosted.org/packages/cf/48/beda67e9eb172442607bfa7e62840ea06526a63e9be2c45daeda45f83d21/Flask-MAuth-1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c1e4caa41563b47ed7cc0485cf78ba7a", "sha256": "6f2935f7d472946ec6bc1016699d14aac262623a7f9c3867c0e70cc34591f2ab" }, "downloads": -1, "filename": "Flask_MAuth-1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "c1e4caa41563b47ed7cc0485cf78ba7a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 14529, "upload_time": "2017-03-03T16:53:09", "url": "https://files.pythonhosted.org/packages/e1/c1/7b0faa8bb448819321a47cacada8e7a7d7f04fb173549d65e5d2e6ff40d2/Flask_MAuth-1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a78b6364222999a385cdabd0649d8b36", "sha256": "6e419a2b3593741b36e00ca1acfe586f98ea25d2d44fabe14dc8bddf48479a54" }, "downloads": -1, "filename": "Flask-MAuth-1.1.tar.gz", "has_sig": false, "md5_digest": "a78b6364222999a385cdabd0649d8b36", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24597, "upload_time": "2017-03-03T16:53:11", "url": "https://files.pythonhosted.org/packages/cf/48/beda67e9eb172442607bfa7e62840ea06526a63e9be2c45daeda45f83d21/Flask-MAuth-1.1.tar.gz" } ] }