Changeset 110

Show
Ignore:
Timestamp:
08/13/07 09:17:43
Author:
thejimmyg
Message:

Added code to check the authenticate middleware is present when using the authorise middleware

Files:

Legend:

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

    r73 r110  
    11Metadata-Version: 1.0 
    22Name: AuthKit 
    3 Version: 0.4.0dev-r71 
     3Version: 0.4.0dev-r98 
    44Summary: An authentication and authorization toolkit for WSGI applications and frameworks 
    55Home-page: http://3aims.com/ 
  • AuthKit/branches/0.4/AuthKit.egg-info/SOURCES.txt

    r73 r110  
     1CHANGELOG 
     2LICENSE.txt 
    13README.txt 
    24setup.cfg 
     
    2224authkit/authenticate/open_id.py 
    2325authkit/authenticate/redirect.py 
     26authkit/authenticate/sso/__init__.py 
     27authkit/authenticate/sso/api.py 
     28authkit/authenticate/sso/cas.py 
    2429authkit/template/__init__.py 
    2530authkit/template/authenticate/setup.cfg 
     
    3035authkit/template/authenticate/ez_setup/__init__.py 
    3136authkit/users/__init__.py 
     37authkit/users/postgresql_driver.py 
    3238authkit/users/sqlalchemy_driver.py 
    3339docs/community.txt 
     
    6571docs/scripts/shCore.uncompressed.js 
    6672examples/authorize.py 
     73examples/config/digest.py 
    6774examples/docs/basic.py 
    6875examples/docs/digest.py 
  • AuthKit/branches/0.4/AuthKit.egg-info/entry_points.txt

    r69 r110  
    88        redirect=authkit.authenticate.redirect:make_redirect_handler 
    99        cookie=authkit.authenticate.cookie:make_cookie_handler 
     10         
     11        cas = authkit.authenticate.sso.cas:make_cas_handler 
    1012 
    1113        [paste.paster_create_template] 
  • AuthKit/branches/0.4/AuthKit.egg-info/requires.txt

    r69 r110  
    1 Paste>=1.3,<=1.
    2 nose>=0.9.2,<=1.0 
    3 PasteDeploy>=1.1,<=1.4 
    4 PasteScript>=1.1,<=1.4 
     1Paste>=1.
     2nose>=0.9.2 
     3PasteDeploy>=1.1 
     4PasteScript>=1.1 
    55python-openid>=1.1,<=1.2 
    66python-yadis==1.0.1,<=1.1 
    77python-urljr==1.0.0,<=1.1 
    88elementtree>=1.2,<=1.3 
    9 beaker>=0.6.2,<0.7 
     9Beaker>=0.7.3 
     10decorator>=2.1.0 
    1011 
    1112[pudge] 
     
    1617 
    1718[full] 
    18 Pylons>=0.9.4,<=1.0 
     19Pylons>=0.9.5,<=1.0 
    1920SQLAlchemy>=0.3.6,<=0.4 
    2021DBUtils>=0.9.2,<=1.0 
     
    2526 
    2627[pylons] 
    27 Pylons>=0.9.4,<=1.0 
     28Pylons>=0.9.5,<=1.0 
    2829 
    2930[mysql] 
  • AuthKit/branches/0.4/authkit/authenticate/__init__.py

    r87 r110  
    9494    how to create your own ``Users`` objects. 
    9595    """ 
     96    log.debug("valid_password called. username: %s", username) 
    9697    if not environ.has_key('authkit.users'): 
    9798        raise no_authkit_users_in_environ 
     
    121122    Only required if you intend to use HTTP digest authentication. 
    122123    """ 
     124    log.debug( 
     125        "digest_password called. username: %s, realm: %s", username, realm 
     126    ) 
    123127    if not environ.has_key('authkit.users'): 
    124128        raise no_authkit_users_in_environ 
     
    158162            users = user_object(user_conf['data']) 
    159163            app = AddToEnviron(app, 'authkit.users', users) 
    160  
     164            log.debug("authkit.users added to environ") 
    161165            if format == 'basic': 
    162166                function = valid_password 
     167                log.debug("valid_password chosen %r", function) 
    163168            elif format == 'digest': 
     169                log.debug("digest_password chosen %r", function) 
    164170                function = digest_password 
    165171            else: 
     
    347353        app = HTTPExceptionHandler(app) 
    348354     
     355    app = AddToEnviron(app, 'authkit.authenticate', True) 
    349356    # Configure the config files 
    350357     
  • AuthKit/branches/0.4/authkit/authorize.py

    r68 r110  
    2525 
    2626from paste import httpexceptions 
    27 #from authkit.permissions import NotAuthenticatedError, NotAuthorizedError 
    2827 
    2928class PermissionSetupError(Exception): 
     
    9493 
    9594    def __call__(self, environ, start_response): 
     95        if not environ.has_key('authkit.authenticate'): 
     96            raise Exception( 
     97                "Authenticate middleware not present" 
     98            )  
    9699        # Could also check that status and response haven't changed here? 
    97100        try: