<NME> README.md
<BEF> Flask-HTTPAuth
==============

[![Build status](https://github.com/miguelgrinberg/Flask-HTTPAuth/workflows/build/badge.svg)](https://github.com/miguelgrinberg/Flask-HTTPAuth/actions) [![codecov](https://codecov.io/gh/miguelgrinberg/Flask-HTTPAuth/branch/master/graph/badge.svg?token=KeU2002DHo)](https://codecov.io/gh/miguelgrinberg/Flask-HTTPAuth)

Simple extension that provides Basic and Digest HTTP authentication for Flask routes.

Basic authentication example
----------------------------

    from flask import Flask
    from flask_httpauth import HTTPBasicAuth
    
    app = Flask(__name__)
    auth = HTTPBasicAuth()
    
    users = {
        "john": "hello",
        "susan": "bye"
    }
    
    @auth.get_password
    def get_pw(username):
        if username in users:
            return users.get(username)
        return None
    
    @app.route('/')
    @auth.login_required
    def index():
        return "Hello, %s!" % auth.username()
        
    if __name__ == '__main__':
        app.run()
        
Note: See the [documentation](http://pythonhosted.org/Flask-HTTPAuth) for more complex examples that involve password hashing and custom verification callbacks.

Digest authentication example
-----------------------------

    from flask import Flask
    from flask_httpauth import HTTPDigestAuth
    
    app = Flask(__name__)
    app.config['SECRET_KEY'] = 'secret key here'
    auth = HTTPDigestAuth()
    
    users = {
        "john": "hello",
        "susan": "bye"
    }
    
    @auth.get_password
    def get_pw(username):
        if username in users:
            return users.get(username)
        return None
        
    @app.route('/')
    @auth.login_required
    def index():
        return "Hello, %s!" % auth.username()
        
    if __name__ == '__main__':
        app.run()

Resources
---------

- [Documentation](http://pythonhosted.org/Flask-HTTPAuth)
- [pypi](https://pypi.python.org/pypi/Flask-HTTPAuth) 

```

Resources
---------

- [Documentation](http://flask-httpauth.readthedocs.io/en/latest/)
- [PyPI](https://pypi.org/project/Flask-HTTPAuth)
- [Change log](https://github.com/miguelgrinberg/Flask-HTTPAuth/blob/master/CHANGES.md)

<MSG> Add syntax highlighting to the README

<DFF> @@ -8,65 +8,69 @@ Simple extension that provides Basic and Digest HTTP authentication for Flask ro
 Basic authentication example
 ----------------------------
 
-    from flask import Flask
-    from flask_httpauth import HTTPBasicAuth
-    
-    app = Flask(__name__)
-    auth = HTTPBasicAuth()
-    
-    users = {
-        "john": "hello",
-        "susan": "bye"
-    }
-    
-    @auth.get_password
-    def get_pw(username):
-        if username in users:
-            return users.get(username)
-        return None
-    
-    @app.route('/')
-    @auth.login_required
-    def index():
-        return "Hello, %s!" % auth.username()
-        
-    if __name__ == '__main__':
-        app.run()
-        
+```python
+from flask import Flask
+from flask_httpauth import HTTPBasicAuth
+
+app = Flask(__name__)
+auth = HTTPBasicAuth()
+
+users = {
+    "john": "hello",
+    "susan": "bye"
+}
+
+@auth.get_password
+def get_pw(username):
+    if username in users:
+        return users.get(username)
+    return None
+
+@app.route('/')
+@auth.login_required
+def index():
+    return "Hello, %s!" % auth.username()
+
+if __name__ == '__main__':
+    app.run()
+```
+
 Note: See the [documentation](http://pythonhosted.org/Flask-HTTPAuth) for more complex examples that involve password hashing and custom verification callbacks.
 
 Digest authentication example
 -----------------------------
 
-    from flask import Flask
-    from flask_httpauth import HTTPDigestAuth
-    
-    app = Flask(__name__)
-    app.config['SECRET_KEY'] = 'secret key here'
-    auth = HTTPDigestAuth()
-    
-    users = {
-        "john": "hello",
-        "susan": "bye"
-    }
-    
-    @auth.get_password
-    def get_pw(username):
-        if username in users:
-            return users.get(username)
-        return None
-        
-    @app.route('/')
-    @auth.login_required
-    def index():
-        return "Hello, %s!" % auth.username()
-        
-    if __name__ == '__main__':
-        app.run()
+```python
+from flask import Flask
+from flask_httpauth import HTTPDigestAuth
+
+app = Flask(__name__)
+app.config['SECRET_KEY'] = 'secret key here'
+auth = HTTPDigestAuth()
+
+users = {
+    "john": "hello",
+    "susan": "bye"
+}
+
+@auth.get_password
+def get_pw(username):
+    if username in users:
+        return users.get(username)
+    return None
+
+@app.route('/')
+@auth.login_required
+def index():
+    return "Hello, %s!" % auth.username()
+
+if __name__ == '__main__':
+    app.run()
+```
 
 Resources
 ---------
 
 - [Documentation](http://pythonhosted.org/Flask-HTTPAuth)
-- [pypi](https://pypi.python.org/pypi/Flask-HTTPAuth) 
+- [pypi](https://pypi.python.org/pypi/Flask-HTTPAuth)
 

Add syntax highlighting to the README