Changeset 144
- Timestamp:
- 01/09/08 20:14:19
- Files:
-
- AuthKit/trunk/AuthKit.egg-info/PKG-INFO (modified) (2 diffs)
- AuthKit/trunk/CHANGELOG.txt (modified) (1 diff)
- AuthKit/trunk/authkit/authenticate/form.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
AuthKit/trunk/AuthKit.egg-info/PKG-INFO
r141 r144 1 1 Metadata-Version: 1.0 2 2 Name: AuthKit 3 Version: 0.4.1dev-r1 393 Version: 0.4.1dev-r143 4 4 Summary: An authentication and authorization toolkit for WSGI applications and frameworks 5 5 Home-page: http://authkit.org/ … … 53 53 0.4.1 (**svn**) 54 54 55 * Fixed #38, cookie sign out path should match the path specified in 56 the config file. 57 * Fixed #37, missing import of sys in digest authentication 58 * Updated SQLAlchemy code to use SQLAlchemyManager. Needs installing 59 manually with ``easy_install SQLAlchemyManager``. 55 60 * Added a user management api_version attribute and changed the API so that 56 61 the users object is set up on each request and recieves an environ AuthKit/trunk/CHANGELOG.txt
r143 r144 4 4 0.4.1 (**svn**) 5 5 6 * AuthKit form authentication now picks up HTTP_X_FORWARDED_HOST and 7 HTTP_X_FORWARDED_PORT when generating an action. This allows you to run 8 an AuthKit app on port 80, proxied from 443 as long as you set up these 9 two (slightly unstandard) variables. 6 10 * Fixed #38, cookie sign out path should match the path specified in 7 11 the config file. AuthKit/trunk/authkit/authenticate/form.py
r139 r144 20 20 21 21 from paste.auth.form import AuthFormHandler 22 from paste.request import construct_url,parse_formvars22 from paste.request import parse_formvars 23 23 from authkit.authenticate import get_template, valid_password, \ 24 24 get_authenticate_function, strip_base, RequireEnvironKey, \ … … 27 27 28 28 import logging 29 import urllib 29 30 log = logging.getLogger('authkit.authenticate.form') 30 31 … … 94 95 return [content] 95 96 97 def construct_url(environ, with_query_string=True, with_path_info=True, 98 script_name=None, path_info=None, querystring=None): 99 """Reconstructs the URL from the WSGI environment. 100 101 You may override SCRIPT_NAME, PATH_INFO, and QUERYSTRING with 102 the keyword arguments. 103 104 """ 105 url = '://' 106 host = environ.get('HTTP_X_FORWARDED_HOST', environ.get('HTTP_HOST')) 107 port = None 108 if ':' in host: 109 host, port = host.split(':', 1) 110 else: 111 host = environ.get('HTTP_X_FORWARDED_HOST', environ.get('HTTP_HOST')) 112 port = environ.get('HTTP_X_FORWARDED_PORT', environ.get('SERVER_PORT')) 113 114 # This is not a good way of determining the request scheme because 115 # the request could be proxied from an HTTPS server to an HTTP server 116 # if environ['wsgi.url_scheme'] == 'https': 117 # if port == '443': 118 # port = None 119 # elif environ['wsgi.url_scheme'] == 'http': 120 # if port == '80': 121 # port = None 122 url += host 123 if port: 124 if port == '443': 125 url = 'https'+url 126 elif port == '80': 127 url = 'http'+url 128 else: 129 url += 'https'+url+':%s' % port 130 else: 131 url = 'http'+url 132 if script_name is None: 133 url += urllib.quote(environ.get('SCRIPT_NAME','')) 134 else: 135 url += urllib.quote(script_name) 136 if with_path_info: 137 if path_info is None: 138 url += urllib.quote(environ.get('PATH_INFO','')) 139 else: 140 url += urllib.quote(path_info) 141 if with_query_string: 142 if querystring is None: 143 if environ.get('QUERY_STRING'): 144 url += '?' + environ['QUERY_STRING'] 145 elif querystring: 146 url += '?' + querystring 147 return url 148 149 150 96 151 def load_form_config( 97 152 app,
