Changeset 158

Show
Ignore:
Timestamp:
11/08/08 00:11:25
Author:
thejimmyg
Message:

Fixed a bug in cookie, added WebOb? exceptions support and applied #52

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • AuthKit/trunk/AuthKit.egg-info/PKG-INFO

    r155 r158  
    11Metadata-Version: 1.0 
    22Name: AuthKit 
    3 Version: 0.4.1dev-r154 
     3Version: 0.4.2dev-r157 
    44Summary: An authentication and authorization toolkit for WSGI applications and frameworks 
    55Home-page: http://authkit.org/ 
     
    5151        ======= 
    5252         
    53         0.4.1 (**svn**) 
     53        0.4.2 
    5454         
     55        * Added support for WebOb HTTPExceptions to remove a deprecation warning in 
     56        Pylons 0.9.7 
     57        * Fixed a missing md5 import in the cookie module 
     58        * Applied patch in ticket #52 
     59         
     60        0.4.1 
     61         
     62        * Added ``setup.fakeuser`` option which automatically sets the REMOTE_USER 
     63        so that it appears someone has signed in. Useful with setup.enable = False 
    5564        ******************************************************************************** 
    56         * The ``authkit.setup.enable = false`` option now also disables  authorisation
     65        * The ``setup.enable = false`` option now also disables  authorisation       
    5766        * checks (reported by Rick Flosi)                                              * 
    5867        ******************************************************************************** 
  • AuthKit/trunk/AuthKit.egg-info/SOURCES.txt

    r155 r158  
    7777docs/scripts/shCore.uncompressed.js 
    7878examples/authorize.py 
     79examples/authorize2.py 
    7980examples/config/digest.py 
    8081examples/docs/basic.py 
  • AuthKit/trunk/AuthKit.egg-info/requires.txt

    r151 r158  
    77Beaker>=0.7.3 
    88decorator>=2.1.0 
     9WebOb>=0.9.3 
    910 
    1011[pudge] 
  • AuthKit/trunk/CHANGELOG.txt

    r157 r158  
    11Changes 
    22======= 
     3 
     40.4.2 
     5 
     6* Added support for WebOb HTTPExceptions to remove a deprecation warning in  
     7  Pylons 0.9.7 
     8* Fixed a missing md5 import in the cookie module 
     9* Applied patch in ticket #52 
    310    
    4110.4.1  
  • AuthKit/trunk/authkit/authenticate/cookie.py

    r149 r158  
    8181from paste.deploy.converters import asbool 
    8282from paste.auth.auth_tkt import * 
     83import md5 
    8384import os 
    8485import time 
  • AuthKit/trunk/authkit/authenticate/multi.py

    r155 r158  
    4141                    # XXX Shouldn't this be returning the writable to the application? 
    4242                    writable = start_response( 
    43                         status_[0],  
    44                         headers_ and headers_[0] or [], 
    45                         exc_info_[0
     43                        status_[-1],  
     44                        headers_ and headers_[-1] or [], 
     45                        exc_info_[-1
    4646                    ) 
    4747                    return writable 
     
    7474                    raise Exception('No headers were returned by the ' 
    7575                                    'application') 
    76                 if checker(environ, status_[0], headers_ and headers_[0] or []): 
     76                if checker(environ, status_[-1], headers_ and headers_[-1] or []): 
    7777                    log.debug( 
    7878                        "MultiMiddleware self.checker check() returning %r",  
     
    8686        if not result_: 
    8787            raise Exception('Invalid WSGI response, did the application return an iterable?') 
    88         if result_[0] is None: 
     88        if result_[-1] is None: 
    8989            # The check failed and the initial app should be used. 
    9090            return app_iter 
     
    9393            if hasattr(app_iter, 'close'): 
    9494                app_iter.close() 
    95             return result_[0
     95            return result_[-1
    9696 
    9797def status_checker(environ, status, headers): 
  • AuthKit/trunk/authkit/authorize/wsgi_adaptors.py

    r155 r158  
    2525 
    2626from paste import httpexceptions 
     27from webob.exc import HTTPForbidden, HTTPUnauthorized 
    2728 
    2829class PermissionSetupError(Exception): 
     
    4041    pass 
    4142 
    42 class NotAuthenticatedError(PermissionError): 
     43class NotAuthenticatedError(PermissionError, HTTPUnauthorized): 
    4344    """ 
    4445    Raised when a permission check fails because the user is not authenticated. 
     
    5253    title = 'Not Authenticated' 
    5354 
    54 class NotAuthorizedError(PermissionError): 
     55class NotAuthorizedError(PermissionError, HTTPForbidden): 
    5556    """ 
    5657    Raised when a permission check fails because the user is not authorized. 
  • AuthKit/trunk/setup.py

    r151 r158  
    2222) 
    2323 
    24 version = '0.4.1
     24version = '0.4.2
    2525 
    2626setup( 
     
    4141        "PasteScript>=1.1", "python-openid>=2.1.1",  
    4242        "elementtree>=1.2,<=1.3", "Beaker>=0.7.3", "decorator>=2.1.0", 
     43        "WebOb>=0.9.3", 
    4344    ], 
    4445    extras_require = {