Changeset 150
- Timestamp:
- 03/14/08 14:36:35
- Files:
-
- AuthKit/trunk/CHANGELOG.txt (modified) (1 diff)
- AuthKit/trunk/authkit/authenticate/__init__.py (modified) (1 diff)
- AuthKit/trunk/examples/user/database/app.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
AuthKit/trunk/CHANGELOG.txt
r148 r150 4 4 0.4.1 (**svn**) 5 5 6 * Updated the user/database example, it now works #43 7 * Updated user tokens code to fix #17 6 8 * Updated authkit.authenticate.multi so that it should fix #41 and pass 7 9 the WSGI writable from start_response() correctly. AuthKit/trunk/authkit/authenticate/__init__.py
r133 r150 217 217 user_object, 218 218 encrypt=encrypt, 219 data=user_conf ['data']219 data=user_conf.get('data'), 220 220 ) 221 221 log.debug("Setting up authkit.users middleware") AuthKit/trunk/examples/user/database/app.py
r141 r150 31 31 elif path == '/': 32 32 return self.index(environ, start_response) 33 elif path == '/signout': 34 return self.signout(environ, start_response) 33 35 else: 34 36 start_response("404 Not Found", [("Content-type","text/plain")]) … … 45 47 46 48 # Induvidual pages 49 def signout(self, environ, start_response): 50 start_response('200 OK', [('Content-type','text/html')]) 51 return ['Signed out'] 52 47 53 def index(self, environ, start_response): 48 54 return self._access_granted( … … 54 60 <li><a href="/admin">Only signed in users with the <tt>admin</tt> role have access [ben]</a></li> 55 61 <li><a href="/group">Only signed in users in the <tt>pylons</tt> group have access [james]</a></li> 62 <li><a href="/signout">Sign out</a></li> 56 63 </ul> 64 <p>The code is set up like this:</p> 65 <pre> 66 users.group_create("pylons") 67 users.role_create("admin") 68 users.user_create("james", password="password1", group="pylons") 69 users.user_create("ben", password="password2") 70 users.user_add_role("ben", role="admin") 71 </pre> 57 72 """ 58 73 ) … … 82 97 form_authenticate_user_type = "authkit.users.sqlalchemy_04_driver:UsersFromDatabase", 83 98 cookie_signoutpath = '/signout', 84 #setup_intercept = "401, 403",99 setup_intercept = "401, 403", 85 100 ) 86 101 app = SQLAlchemyManager(app, {'sqlalchemy.url':'sqlite:///test.db'}, [authkit.users.sqlalchemy_04_driver.setup_model])
