{ "info": { "author": "Andrew Rowe", "author_email": "rowe.andrew.d@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: MacOS", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Operating System :: Unix", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Flask-change-password: Feature rich change password page\n========================================================\n\n|PyPI Version|\n\nFlask-change-password is a Flask extension that implements create and change\npassword pages that can easily be integrated with a Flask application.\n\nFeatures\n--------\n\n\nInstallation & Basic Usage\n--------------------------\n\nInstall via `pip `_:\n\n::\n\n pip install flask-change-password\n\nAfter installing, wrap your Flask app with an ``ChangePassword``, or call init_app(app).\n\nExample:\n\n.. code:: python\n\n from flask import Flask\n from flask_change_password import ChangePassword, ChangePasswordForm, SetPasswordForm\n\n app = Flask(__name__)\n\n app.secret_key = os.urandom(20)\n flask_change_password = ChangePassword(min_password_length=10, rules=dict(long_password_override=2))\n flask_change_password.init_app(app)\n\n\nThe GitHub repository includes a small example application which shows how to use in an application.\n\nNOTES\n-----\n\nThis extension uses KnockoutJS for the page view controller and will call the JS from a CDN.\n\n \n\nThe source will need to be allowed in your CSP, if you have one.\n\nOptions\n-------\n\n- ``app``, Flask application. Use init_app(app) to initialise later on.\n\nRules\n-----\n\nA rules dictionary controls how the password is checked and certain aspects of the page operation.\n\nThe rules are:\n\n rules = {'punctuation': 1, 'uppercase': 1, 'lowercase': 1, 'number_sequence': True,\n 'username': True, 'numbers': 1, 'username_length': 0, 'username_requires_separators': False,\n 'passwords': True, 'keyboard_sequence': False, 'alphabet_sequence': False, 'flash': True\n 'long_password_override': 0, 'pwned': True, 'show_hide_passwords': True, 'min_password_length': 20}\n\n* punctuation - required punctuation in the password (string.punctuation is used).\n* uppercase - required upper case letters.\n* lowercase - required lower case letters.\n* number_sequence - forbid 3 or more numbers in sequence. ie: 123,234,456 etc.\n* username - forbid the password from containing the user name (if supplied as user).\n* numbers - required numbers.\n* passwords - forbid using a password similar to the top 10000 used passwords.\n* keyboard_sequence - forbid a sequence of 4 or more keyboard letters, ie: qwerty.\n* alphabet_sequence - forbid a sequence of 4 or more alphabetic ordered letters, ie: abcd.\n* long_password_override - number - when a password is this number times the min length, rules are not enforced. Set to 0 to disable. Default is 2\n* pwned - dynamically query HIBP list of hacked and released passwords and forbid any hacked password found. see: https://haveibeenpwned.com/API/v2#PwnedPasswords\n* show_hide_passwords - allow the client to click to show the password on the page\n* min_password_length - minimum length of the password\n* flash - produce Flask flash messages on errors\n\nUse the `update_rules` method to change the rules.\n\nUsername creation not yet discussed.\n\n* username_length - minimum length for a username\n* username_requires_separators - username must use . or - inside\n\n\nMethods\n-------\n\n- ``ChangePassword(app=None, min_password_length=20, rules=None)`` - Create object.\n- ``init_app(app)`` - Initialise and start with the given Flask application.\n- ``change_password_template(form, submit_text=None)`` - Format and return a\n fragment of HTML that implements the change/set password form. form is the\n required password operation form. submit_text is the text to show on the submit\n button. Default is 'submit'\n- ``update_rules(rules=None)`` - Modify the current rules by supplying a dictionary of new rules\n\nAdding the form to a page\n-------------------------\n\nCall as follows in your Flask application route:\n\n.. code:: python\n\n return render_template('change_password.html', password_template=password_template, title=title, form=form,\n user=dict(username='test.user'),\n )\n\nAnd include the template using the jinja2 `safe` pipe.\n\n.. code:: html\n\n {% extends \"base.html\" %}\n\n {% block app_content %}\n

Test Change Password

\n {{ password_template|safe }}\n {% endblock %}\n\n\nChange Password\n---------------\n\nExample of calling the change password form.\n\n.. code:: python\n\n @app.route('/change_password', methods=['GET', 'POST'])\n def page_change_password():\n title = 'Change Password'\n form = ChangePasswordForm(username='test.user', changing=True, title=title)\n if form.validate_on_submit():\n valid = flask_change_password.verify_password_change_form(form)\n if valid:\n return redirect(url_for('page_changed', title='changed', new_password=form.password.data))\n\n return redirect(url_for('page_change_password'))\n password_template = flask_change_password.change_password_template(form, submit_text='Change')\n return render_template('change_password.html', password_template=password_template, title=title, form=form,\n user=dict(username='test.user'),\n )\n\nCreate Password\n---------------\n\nExample of calling the create password form. Use the SetPasswordForm class.\n\n.. code:: python\n\n @app.route('/create_password', methods=['GET', 'POST'])\n def page_create_password():\n title = 'Create Password'\n form = SetPasswordForm(username='test.user', title=title)\n if form.validate_on_submit():\n valid = flask_change_password.verify_password_change_form(form)\n if valid:\n return redirect(url_for('page_changed', title='created', new_password=form.password.data))\n\n return redirect(url_for('page_create_password'))\n password_template = flask_change_password.change_password_template(form, submit_text='Submit')\n return render_template('create_password.html', password_template=password_template, title=title, form=form,\n user=dict(username='test.user'),\n )\n\n\n\n\nLicensing\n---------\n\n- Apache 2.0\n\n.. |PyPI Version| image:: https://img.shields.io/pypi/v/flask-change-password.svg\n :target: https://pypi.python.org/pypi/flask-change-password", "description_content_type": "text/x-rst", "docs_url": null, "download_url": "https://github.com/Martlark/flask-change-password/archive/0.0.7.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Martlark/flask-change-password", "keywords": "flask change password page", "license": "Apache Software License", "maintainer": "", "maintainer_email": "", "name": "flask-change-password", "package_url": "https://pypi.org/project/flask-change-password/", "platform": "", "project_url": "https://pypi.org/project/flask-change-password/", "project_urls": { "Download": "https://github.com/Martlark/flask-change-password/archive/0.0.7.tar.gz", "Homepage": "https://github.com/Martlark/flask-change-password" }, "release_url": "https://pypi.org/project/flask-change-password/0.0.7/", "requires_dist": null, "requires_python": "", "summary": "password change and set pages for Flask.", "version": "0.0.7" }, "last_serial": 5215076, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "462a21517ae69bd0cf8289bb4c028de8", "sha256": "90ae0fd8bd208271934a7720cce24a55e66457c495bcd15805e2af88198b225b" }, "downloads": -1, "filename": "flask-change-password-0.0.1.tar.gz", "has_sig": false, "md5_digest": "462a21517ae69bd0cf8289bb4c028de8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12792, "upload_time": "2019-04-30T03:16:23", "url": "https://files.pythonhosted.org/packages/ab/43/1038bec0a2db6f78a1c124b9cf5070bfb38341879de3c0304e8d2c53e0c6/flask-change-password-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "a203b6fad0a7366c465197f33aa96c96", "sha256": "6e10495c64079d048141389392d38910d04f55b5fa1b101bebc643bc243393b7" }, "downloads": -1, "filename": "flask-change-password-0.0.2.tar.gz", "has_sig": false, "md5_digest": "a203b6fad0a7366c465197f33aa96c96", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10784, "upload_time": "2019-05-01T02:06:55", "url": "https://files.pythonhosted.org/packages/47/d4/bb8cd9d626272480a97221c599c76f9371ee54d54de81b05d5510b67f750/flask-change-password-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "000494f627bc2949a37a087db1843699", "sha256": "7d6ea17df992b75a2b069df5977fd1987283e4099e10036f5ec28832f9f8575c" }, "downloads": -1, "filename": "flask-change-password-0.0.3.tar.gz", "has_sig": false, "md5_digest": "000494f627bc2949a37a087db1843699", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10806, "upload_time": "2019-05-01T02:12:03", "url": "https://files.pythonhosted.org/packages/12/4f/f19817cbf79b3c2c37c07ae0434597faf043a8ba4f173d669924413a7372/flask-change-password-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "1463a7fc6ff666d7e608d49ab6a70b67", "sha256": "7b093a7e9a8ed2e4c511b9b8a20746157a33fb85a1908be96e566688d71ff718" }, "downloads": -1, "filename": "flask-change-password-0.0.4.tar.gz", "has_sig": false, "md5_digest": "1463a7fc6ff666d7e608d49ab6a70b67", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11547, "upload_time": "2019-05-01T03:29:48", "url": "https://files.pythonhosted.org/packages/0e/53/3c7f3b92f7a69a668351d2f3d675e8b55752d3221d9dee72d3937c4a9483/flask-change-password-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "12edd4e02b1d62f81dc934df2fada4af", "sha256": "e79d4aa4995bce0d64fdfccdc7325c7a19d07637f6ca6efd7fd4bc1bc6cfe895" }, "downloads": -1, "filename": "flask-change-password-0.0.5.tar.gz", "has_sig": false, "md5_digest": "12edd4e02b1d62f81dc934df2fada4af", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13219, "upload_time": "2019-05-01T06:28:46", "url": "https://files.pythonhosted.org/packages/b3/0e/1ac7265b565744bb4ec8f447124234c2aa521fc85d7457ff32d739ec9121/flask-change-password-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "bbb25f6dc316d98073db5a31ae4bdc36", "sha256": "5490d3c1542b0a14ac76a713afb4327f7417103b6499f7c3a600c59aa56ac7da" }, "downloads": -1, "filename": "flask-change-password-0.0.6.tar.gz", "has_sig": false, "md5_digest": "bbb25f6dc316d98073db5a31ae4bdc36", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13494, "upload_time": "2019-05-02T01:35:56", "url": "https://files.pythonhosted.org/packages/a8/3b/8b84d4d8bc9a16f9fbd84580104824eeb3fe6ccc11b44494f68b98b0045a/flask-change-password-0.0.6.tar.gz" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "450ce5aeb7211f2aab9b4ed78ec9bcf5", "sha256": "984eecc402d69b80c92ddbd8f127c7fd6d913702c640cbe36e551551639e74f9" }, "downloads": -1, "filename": "flask-change-password-0.0.7.tar.gz", "has_sig": false, "md5_digest": "450ce5aeb7211f2aab9b4ed78ec9bcf5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 53266, "upload_time": "2019-05-02T01:48:19", "url": "https://files.pythonhosted.org/packages/58/ac/aafbc0e002efcec8ef23d0903e37bddbab8925a155537c4831daafec0a79/flask-change-password-0.0.7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "450ce5aeb7211f2aab9b4ed78ec9bcf5", "sha256": "984eecc402d69b80c92ddbd8f127c7fd6d913702c640cbe36e551551639e74f9" }, "downloads": -1, "filename": "flask-change-password-0.0.7.tar.gz", "has_sig": false, "md5_digest": "450ce5aeb7211f2aab9b4ed78ec9bcf5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 53266, "upload_time": "2019-05-02T01:48:19", "url": "https://files.pythonhosted.org/packages/58/ac/aafbc0e002efcec8ef23d0903e37bddbab8925a155537c4831daafec0a79/flask-change-password-0.0.7.tar.gz" } ] }