Changeset 133
- Timestamp:
- 11/05/07 16:53:37
- Files:
-
- AuthKit/trunk/AuthKit.egg-info/PKG-INFO (modified) (3 diffs)
- AuthKit/trunk/CHANGELOG.txt (modified) (1 diff)
- AuthKit/trunk/authkit/authenticate/__init__.py (modified) (3 diffs)
- AuthKit/trunk/authkit/users/postgresql_driver.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
AuthKit/trunk/AuthKit.egg-info/PKG-INFO
r128 r133 1 1 Metadata-Version: 1.0 2 2 Name: AuthKit 3 Version: 0.4. 0-r1273 Version: 0.4.1dev-r132 4 4 Summary: An authentication and authorization toolkit for WSGI applications and frameworks 5 5 Home-page: http://authkit.org/ … … 32 32 33 33 * `Download and Installation <http://python.org/pypi/AuthKit/0.4.0>`_ 34 * `Pylons Book <http://pylonsbook.com>`_ (the two chapters on Authentication and35 Authorization and Advanced AuthKitform the AuthKit 0.4 documentation)34 * `Pylons Book <http://pylonsbook.com>`_ (the two chapters on *Authentication and 35 Authorization* and *Advanced AuthKit* form the AuthKit 0.4 documentation) 36 36 * `Module Reference <http://authkit.org/docs/0.4/module-index.html>`_ 37 * `AuthKit Cookbook <http://wiki.pylonshq.com/display/authkitcookbook/Home>`_ 37 38 * `Trac <http://authkit.org/trac>`_ - Tickets, Wiki, Subversion 38 39 * `Examples <http://authkit.org/trac/browser/AuthKit/trunk/examples>`_ … … 50 51 ======= 51 52 52 0.4 (**svn**)53 0.4.1 (**svn**) 53 54 54 *** AS A RESULT OF THESE CHANGES THE DOCS ARE CURRENTLY OUT OF DATE *** 55 * Added a user management api_version attribute and changed the API so that 56 the users object is set up on each request and recieves an environ 57 argument. 58 * Fixed encrypt typo with postgres users driver 59 60 0.4.0 55 61 56 62 * Added support for encrypted passwords AuthKit/trunk/CHANGELOG.txt
r128 r133 2 2 ======= 3 3 4 0.4 (**svn**)4 0.4.1 (**svn**) 5 5 6 *** AS A RESULT OF THESE CHANGES THE DOCS ARE CURRENTLY OUT OF DATE *** 6 * Added a user management api_version attribute and changed the API so that 7 the users object is set up on each request and recieves an environ 8 argument. 9 * Fixed encrypt typo with postgres users driver 10 11 0.4.0 7 12 8 13 * Added support for encrypted passwords AuthKit/trunk/authkit/authenticate/__init__.py
r120 r133 125 125 return True 126 126 return False 127 127 128 128 129 def digest_password(environ, realm, username): … … 156 157 # correct thing: 157 158 return None 159 160 class AddUsersObjectToEnviron(object): 161 """Simple middleware which adds a Users object to the environ.""" 162 def __init__(self, app, key, value, *k, **p): 163 self.app = app 164 self.k = k 165 self.p = p 166 self.key = key 167 self.value = value 168 169 def __call__(self, environ, start_response): 170 p = {} 171 p.update(self.p) 172 p['environ'] = environ 173 environ[self.key] = self.value(*self.k, **p) 174 return self.app(environ, start_response) 158 175 159 176 def get_authenticate_function(app, authenticate_conf, format, prefix): … … 189 206 if isinstance(user_object, (str, unicode)): 190 207 user_object = eval_import(user_object) 191 users = user_object(user_conf['data'], encrypt) 192 app = AddToEnviron(app, 'authkit.users', users) 193 log.debug("authkit.users added to environ") 208 209 if not hasattr(user_object, "api_version"): 210 users = user_object(user_conf['data'], encrypt) 211 app = AddToEnviron(app, 'authkit.users', users) 212 log.debug("authkit.users added to environ") 213 elif user_object.api_version == 0.4: 214 app = AddUsersObjectToEnviron( 215 app, 216 'authkit.users', 217 user_object, 218 encrypt=encrypt, 219 data=user_conf['data'] 220 ) 221 log.debug("Setting up authkit.users middleware") 222 else: 223 raise Exception( 224 'Unknown API version %s for user management API'%( 225 users.api_version, 226 ) 227 ) 194 228 if format == 'basic': 195 229 function = valid_password AuthKit/trunk/authkit/users/postgresql_driver.py
r131 r133 15 15 Raw SQL Version 16 16 """ 17 def __init__(self, data, encrypt=None): 17 api_version = 0.4 18 19 def __init__(self, environ, data, encrypt=None): 18 20 if encrypt is None: 19 21 def encrypt(password): … … 33 35 ) 34 36 self.get_conn, self.release_conn = data 37 self.environ = environ 35 38 36 39 def create_tables(self):
