Ticket #210: AuthKitMapFish.patch
| File AuthKitMapFish.patch, 6.2 kB (added by pvalsecc, 5 months ago) |
|---|
-
AuthKit.egg-info/SOURCES.txt
old new 76 76 docs/scripts/shCore.js 77 77 docs/scripts/shCore.uncompressed.js 78 78 examples/authorize.py 79 examples/authorize2.py 79 80 examples/config/digest.py 80 81 examples/docs/basic.py 81 82 examples/docs/digest.py … … 97 98 ez_setup/README.txt 98 99 ez_setup/__init__.py 99 100 test/test.py 100 test/user_file_data.txt 101 test/user_file_data.txt -
AuthKit.egg-info/PKG-INFO
old new 1 1 Metadata-Version: 1.0 2 2 Name: AuthKit 3 Version: 0.4.1dev-r15 43 Version: 0.4.1dev-r156 4 4 Summary: An authentication and authorization toolkit for WSGI applications and frameworks 5 5 Home-page: http://authkit.org/ 6 6 Author: James Gardner … … 52 52 53 53 0.4.1 (**svn**) 54 54 55 * Added ``setup.fakeuser`` option which automatically sets the REMOTE_USER 56 so that it appears someone has signed in. Useful with setup.enable = False 55 57 ******************************************************************************** 56 * The `` authkit.setup.enable = false`` option now also disables authorisation*58 * The ``setup.enable = false`` option now also disables authorisation * 57 59 * checks (reported by Rick Flosi) * 58 60 ******************************************************************************** 59 61 * Applied patch from Pawel Niewiadomski to fix #53 -
authkit/authenticate/cookie.py
old new 372 372 environ['REMOTE_USER'] = userid 373 373 if environ.get('REMOTE_USER_TOKENS'): 374 374 # We want to add tokens/roles to what's there: 375 tokens = environ['REMOTE_USER_TOKENS'] + ',' + tokens375 tokens = str(environ['REMOTE_USER_TOKENS']) + ',' + str(tokens) 376 376 environ['REMOTE_USER_TOKENS'] = tokens 377 377 environ['REMOTE_USER_DATA'] = user_data 378 378 environ['AUTH_TYPE'] = 'cookie' -
authkit/authenticate/multi.py
old new 40 40 log.debug("Multi: No binding was found for the check") 41 41 # XXX Shouldn't this be returning the writable to the application? 42 42 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] 46 46 ) 47 47 return writable 48 48 else: … … 73 73 if not len(headers_): 74 74 raise Exception('No headers were returned by the ' 75 75 'application') 76 if checker(environ, status_[ 0], headers_ and headers_[0] or []):76 if checker(environ, status_[-1], headers_ and headers_[-1] or []): 77 77 log.debug( 78 78 "MultiMiddleware self.checker check() returning %r", 79 79 binding … … 85 85 app_iter = app(environ, start_response) 86 86 if not result_: 87 87 raise Exception('Invalid WSGI response, did the application return an iterable?') 88 if result_[ 0] is None:88 if result_[-1] is None: 89 89 # The check failed and the initial app should be used. 90 90 return app_iter 91 91 else: 92 92 # Close the unused app which we don't want 93 93 if hasattr(app_iter, 'close'): 94 94 app_iter.close() 95 return result_[ 0]95 return result_[-1] 96 96 97 97 def status_checker(environ, status, headers): 98 98 """ -
authkit/authenticate/open_id.py
old new 372 372 username = info.identity_url 373 373 if info.endpoint.canonicalID: 374 374 username = cgi.escape(info.endpoint.canonicalID) 375 user_data = str(sreg.SRegResponse.fromSuccessResponse(info).getExtensionArgs()) 375 sreg_info = sreg.SRegResponse.fromSuccessResponse(info) 376 if sreg_info: 377 user_data = str(sreg.SRegResponse.fromSuccessResponse(info).getExtensionArgs()) 378 else: 379 user_data = "" 376 380 # Set the cookie 377 381 if self.urltouser: 378 382 username = self.urltouser(environ, info.identity_url) … … 464 468 sreg_required=options['sreg_required'], 465 469 sreg_optional=options['sreg_optional'], 466 470 sreg_policyurl=options['sreg_policyurl'], 471 session_middleware=options['session_middleware'] 467 472 ) 468 473 self.app = app 469 474 … … 502 507 'sreg_required': auth_conf.get('sreg.required'), 503 508 'sreg_optional': auth_conf.get('sreg.optional'), 504 509 'sreg_policyurl': auth_conf.get('sreg.policyurl'), 505 'session_middleware': 'beaker.session',510 'session_middleware': auth_conf.get('session.middleware','beaker.session'), 506 511 } 507 512 auth_handler_params={ 508 513 'template':user_setter_params['template'], … … 510 515 'baseurl':user_setter_params['baseurl'], 511 516 'charset':user_setter_params['charset'], 512 517 } 518 authenticate_conf = strip_base(auth_conf, 'authenticate.') 519 app, authfunc, users = get_authenticate_function( 520 app, 521 authenticate_conf, 522 prefix=prefix+'authenticate.', 523 format='basic' 524 ) 513 525 return app, auth_handler_params, user_setter_params 514 526 515 527 def make_passurl_handler(