Skip to content

Commit

Permalink
Modified documents and readme for correct import statement
Browse files Browse the repository at this point in the history
  • Loading branch information
Aayush-Kasurde committed Mar 20, 2015
1 parent b289d37 commit b757375
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Basic authentication example
----------------------------

from flask import Flask
from flask.ext.httpauth import HTTPBasicAuth
from flask_httpauth import HTTPBasicAuth

app = Flask(__name__)
auth = HTTPBasicAuth()
Expand Down Expand Up @@ -37,7 +37,7 @@ Digest authentication example
-----------------------------

from flask import Flask
from flask.ext.httpauth import HTTPDigestAuth
from flask_httpauth import HTTPDigestAuth

app = Flask(__name__)
app.config['SECRET_KEY'] = 'secret key here'
Expand Down
7 changes: 3 additions & 4 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Basic authentication example
The following example application uses HTTP Basic authentication to protect route ``'/'``::

from flask import Flask
from flask.ext.httpauth import HTTPBasicAuth
from flask_httpauth import HTTPBasicAuth
app = Flask(__name__)
auth = HTTPBasicAuth()
Expand Down Expand Up @@ -67,7 +67,7 @@ Digest authentication example
The following example is similar to the previous one, but HTTP Digest authentication is used::

from flask import Flask
from flask.ext.httpauth import HTTPDigestAuth
from flask_httpauth import HTTPDigestAuth
app = Flask(__name__)
app.config['SECRET_KEY'] = 'secret key here'
Expand Down Expand Up @@ -167,7 +167,7 @@ API Documentation
def index():
return "Hello, %s!" % auth.username()

.. class:: flask.ext.httpauth.HTTPDigestAuth
.. class:: flask_httpauth.HTTPDigestAuth

This class that handles HTTP Digest authentication for Flask routes. The ``SECRET_KEY`` configuration must be set in the Flask application to enable the session to work. Flask by default stores user sessions in the client as secure cookies, so the client must be able to handle cookies. To support clients that are not web browsers or that cannot handle cookies a `session interface <http://flask.pocoo.org/docs/api/#flask.Flask.session_interface>`_ that writes sessions in the server must be used.

Expand All @@ -186,4 +186,3 @@ API Documentation
.. method:: username()

See basic authentication for documentation and examples.

2 changes: 1 addition & 1 deletion flask_httpauth.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
flask.ext.httpauth
flask_httpauth
==================
This module provides Basic and Digest HTTP authentication for Flask routes.
Expand Down
2 changes: 1 addition & 1 deletion test_httpauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import re
from hashlib import md5 as basic_md5
from flask import Flask, g
from flask.ext.httpauth import HTTPBasicAuth, HTTPDigestAuth
from flask_httpauth import HTTPBasicAuth, HTTPDigestAuth
from werkzeug.http import parse_dict_header


Expand Down

0 comments on commit b757375

Please sign in to comment.