diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-04-21 15:26:47 +0200 |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-04-21 15:26:47 +0200 |
commit | 04ecd5542849191457ccfc3e42a39452db47825a (patch) | |
tree | b0a470e46326b709d090a900847bbb004d355607 /paste/auth | |
parent | 4c177fce89fee925f0f4fbfde00ce2e1252562c0 (diff) | |
download | paste-04ecd5542849191457ccfc3e42a39452db47825a.tar.gz |
Strip trailing spaces
Diffstat (limited to 'paste/auth')
-rw-r--r-- | paste/auth/basic.py | 4 | ||||
-rw-r--r-- | paste/auth/cookie.py | 2 | ||||
-rw-r--r-- | paste/auth/form.py | 2 | ||||
-rw-r--r-- | paste/auth/grantip.py | 12 | ||||
-rw-r--r-- | paste/auth/open_id.py | 10 |
5 files changed, 15 insertions, 15 deletions
diff --git a/paste/auth/basic.py b/paste/auth/basic.py index 69db128..24d1731 100644 --- a/paste/auth/basic.py +++ b/paste/auth/basic.py @@ -108,14 +108,14 @@ def make_basic(app, global_conf, realm, authfunc, **kw): use = egg:Paste#auth_basic realm=myrealm authfunc=somepackage.somemodule:somefunction - + """ from paste.util.import_string import eval_import import types authfunc = eval_import(authfunc) assert isinstance(authfunc, types.FunctionType), "authfunc must resolve to a function" return AuthBasicHandler(app, realm, authfunc) - + if "__main__" == __name__: import doctest diff --git a/paste/auth/cookie.py b/paste/auth/cookie.py index c636824..14b1fd8 100644 --- a/paste/auth/cookie.py +++ b/paste/auth/cookie.py @@ -368,7 +368,7 @@ def make_auth_cookie( The maximum length of the cookie that is sent (default 4k, which is a typical browser maximum) - + """ if isinstance(scanlist, six.string_types): scanlist = scanlist.split() diff --git a/paste/auth/form.py b/paste/auth/form.py index 4e6aa49..9be82a2 100644 --- a/paste/auth/form.py +++ b/paste/auth/form.py @@ -131,7 +131,7 @@ def make_form(app, global_conf, realm, authfunc, **kw): use = egg:Paste#auth_form realm=myrealm authfunc=somepackage.somemodule:somefunction - + """ from paste.util.import_string import eval_import import types diff --git a/paste/auth/grantip.py b/paste/auth/grantip.py index 4ea6df5..2ee9bcf 100644 --- a/paste/auth/grantip.py +++ b/paste/auth/grantip.py @@ -38,7 +38,7 @@ class GrantIPMiddleware(object): if roles and isinstance(roles, six.string_types): roles = roles.split(',') return (username, roles) - + def __call__(self, environ, start_response): addr = ip4.ip2int(environ['REMOTE_ADDR'], False) remove_user = False @@ -74,8 +74,8 @@ class GrantIPMiddleware(object): if role in cur_roles: cur_roles.remove(role) environ['REMOTE_USER_TOKENS'] = ','.join(cur_roles) - - + + def make_grantip(app, global_conf, clobber_username=False, **kw): """ Grant roles or usernames based on IP addresses. @@ -93,7 +93,7 @@ def make_grantip(app, global_conf, clobber_username=False, **kw): 192.168.0.7 = joe # And one IP is should not be logged in: 192.168.0.10 = __remove__:-editor - + """ from paste.deploy.converters import asbool clobber_username = asbool(clobber_username) @@ -110,5 +110,5 @@ def make_grantip(app, global_conf, clobber_username=False, **kw): role = '' ip_map[key] = value return GrantIPMiddleware(app, ip_map, clobber_username) - - + + diff --git a/paste/auth/open_id.py b/paste/auth/open_id.py index 967e699..f79f7f8 100644 --- a/paste/auth/open_id.py +++ b/paste/auth/open_id.py @@ -91,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. |