diff options
Diffstat (limited to 'paste/auth/open_id.py')
-rw-r--r-- | paste/auth/open_id.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/paste/auth/open_id.py b/paste/auth/open_id.py index f6efe61..f79f7f8 100644 --- a/paste/auth/open_id.py +++ b/paste/auth/open_id.py @@ -58,6 +58,7 @@ __all__ = ['AuthOpenIDHandler'] import cgi import urlparse import re +import six import paste.request from paste import httpexceptions @@ -90,20 +91,20 @@ class AuthOpenIDHandler(object): ``app`` Your WSGI app to call - + ``data_store_path`` Directory to store crypto data in for use with OpenID servers. - + ``auth_prefix`` Location for authentication process/verification - + ``login_redirect`` Location to load after successful process of login - + ``catch_401`` If true, then any 401 responses will turn into open ID login requirements. - + ``url_to_username`` A function called like ``url_to_username(environ, url)``, which should return a string username. If not given, the URL will be the username. @@ -398,7 +399,7 @@ def make_open_id_middleware( from paste.deploy.converters import asbool from paste.util import import_string catch_401 = asbool(catch_401) - if url_to_username and isinstance(url_to_username, basestring): + if url_to_username and isinstance(url_to_username, six.string_types): url_to_username = import_string.eval_import(url_to_username) apply_auth_tkt = asbool(apply_auth_tkt) new_app = AuthOpenIDHandler( |