Giter VIP home page Giter VIP logo

repoze.who's People

Contributors

amol- avatar anseljh avatar aodag avatar boykoc avatar cguardia avatar crashekar avatar gnarea avatar jurov avatar lod avatar malthe avatar mcdonc avatar mnaberez avatar muellert avatar rhoerbe avatar rockyburt avatar tseaver avatar wichert avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

repoze.who's Issues

Repoze.API.forget() won't block remember calls when used as middleware

As best I can tell from [1], the identity variable passed to api.remember() is the one from the api.authenticate() call that happened on the ingress path of the request. This means that if the underlying app calls api.logout(), even though the environ's repoze.who.identity entry is deleted, the remember call still gets provided the original identity.

At the moment I'm having to add a check in remember() to see if the environ's repoze.who.identity is set and do nothing if it's not (since we should be authenticated and that variable populated by then). Am I missing something, or am I not using the middleware in the right way?

The fix looks like it would be to not pass identity on the line at 117, which will then get picked up from the environ instead in the api's remember call.

Happy to provide further information if it will help in any way?

[1] https://github.com/repoze/repoze.who/blob/master/repoze/who/middleware.py#L117

2.4: pytest is failing

Looks like issue described on pytest-dev/pytest#3151 (where are as well links to solutions in many modules).
Here is pytest log

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-repoze-who-2.4-5.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-repoze-who-2.4-5.fc35.x86_64/usr/lib/python3.8/site-packages
+ PYTHONDONTWRITEBYTECODE=1
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.9, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
rootdir: /home/tkloczko/rpmbuild/BUILD/repoze.who-2.4
plugins: forked-1.3.0, shutil-1.7.0, virtualenv-1.7.0, expect-1.1.0, httpbin-1.0.0, xdist-2.2.1, flake8-1.0.7, timeout-1.4.2, betamax-0.8.1, freezegun-0.4.2, cases-3.4.6, case-1.5.3, isort-1.3.0, aspectlib-1.5.2, asyncio-0.15.1, toolbox-0.5, xprocess-0.17.1, aiohttp-0.3.0, checkdocs-2.7.0, mock-3.6.1, rerunfailures-9.1.1, requests-mock-1.9.3, Faker-8.4.0, cov-2.12.1, pyfakefs-4.5.0, hypothesis-6.13.14
collected 2 items / 12 errors

================================================================================== ERRORS ==================================================================================
________________________________________________________ ERROR collecting repoze/who/plugins/tests/test_authtkt.py _________________________________________________________
import file mismatch:
imported module 'repoze.who.plugins.tests.test_authtkt' has this __file__ attribute:
  /home/tkloczko/rpmbuild/BUILDROOT/python-repoze-who-2.4-5.fc35.x86_64/usr/lib/python3.8/site-packages/repoze/who/plugins/tests/test_authtkt.py
which is not the same as the test file we want to collect:
  /home/tkloczko/rpmbuild/BUILD/repoze.who-2.4/repoze/who/plugins/tests/test_authtkt.py
HINT: remove __pycache__ / .pyc files and/or use a unique basename for your test file modules
_______________________________________________________ ERROR collecting repoze/who/plugins/tests/test_basicauth.py ________________________________________________________
import file mismatch:
imported module 'repoze.who.plugins.tests.test_basicauth' has this __file__ attribute:
  /home/tkloczko/rpmbuild/BUILDROOT/python-repoze-who-2.4-5.fc35.x86_64/usr/lib/python3.8/site-packages/repoze/who/plugins/tests/test_basicauth.py
which is not the same as the test file we want to collect:
  /home/tkloczko/rpmbuild/BUILD/repoze.who-2.4/repoze/who/plugins/tests/test_basicauth.py
HINT: remove __pycache__ / .pyc files and/or use a unique basename for your test file modules
________________________________________________________ ERROR collecting repoze/who/plugins/tests/test_htpasswd.py ________________________________________________________
import file mismatch:
imported module 'repoze.who.plugins.tests.test_htpasswd' has this __file__ attribute:
  /home/tkloczko/rpmbuild/BUILDROOT/python-repoze-who-2.4-5.fc35.x86_64/usr/lib/python3.8/site-packages/repoze/who/plugins/tests/test_htpasswd.py
which is not the same as the test file we want to collect:
  /home/tkloczko/rpmbuild/BUILD/repoze.who-2.4/repoze/who/plugins/tests/test_htpasswd.py
HINT: remove __pycache__ / .pyc files and/or use a unique basename for your test file modules
_______________________________________________________ ERROR collecting repoze/who/plugins/tests/test_redirector.py _______________________________________________________
import file mismatch:
imported module 'repoze.who.plugins.tests.test_redirector' has this __file__ attribute:
  /home/tkloczko/rpmbuild/BUILDROOT/python-repoze-who-2.4-5.fc35.x86_64/usr/lib/python3.8/site-packages/repoze/who/plugins/tests/test_redirector.py
which is not the same as the test file we want to collect:
  /home/tkloczko/rpmbuild/BUILD/repoze.who-2.4/repoze/who/plugins/tests/test_redirector.py
HINT: remove __pycache__ / .pyc files and/or use a unique basename for your test file modules
__________________________________________________________ ERROR collecting repoze/who/plugins/tests/test_sql.py ___________________________________________________________
import file mismatch:
imported module 'repoze.who.plugins.tests.test_sql' has this __file__ attribute:
  /home/tkloczko/rpmbuild/BUILDROOT/python-repoze-who-2.4-5.fc35.x86_64/usr/lib/python3.8/site-packages/repoze/who/plugins/tests/test_sql.py
which is not the same as the test file we want to collect:
  /home/tkloczko/rpmbuild/BUILD/repoze.who-2.4/repoze/who/plugins/tests/test_sql.py
HINT: remove __pycache__ / .pyc files and/or use a unique basename for your test file modules
___________________________________________________________ ERROR collecting repoze/who/tests/test__auth_tkt.py ____________________________________________________________
import file mismatch:
imported module 'repoze.who.tests.test__auth_tkt' has this __file__ attribute:
  /home/tkloczko/rpmbuild/BUILDROOT/python-repoze-who-2.4-5.fc35.x86_64/usr/lib/python3.8/site-packages/repoze/who/tests/test__auth_tkt.py
which is not the same as the test file we want to collect:
  /home/tkloczko/rpmbuild/BUILD/repoze.who-2.4/repoze/who/tests/test__auth_tkt.py
HINT: remove __pycache__ / .pyc files and/or use a unique basename for your test file modules
____________________________________________________________ ERROR collecting repoze/who/tests/test__compat.py _____________________________________________________________
import file mismatch:
imported module 'repoze.who.tests.test__compat' has this __file__ attribute:
  /home/tkloczko/rpmbuild/BUILDROOT/python-repoze-who-2.4-5.fc35.x86_64/usr/lib/python3.8/site-packages/repoze/who/tests/test__compat.py
which is not the same as the test file we want to collect:
  /home/tkloczko/rpmbuild/BUILD/repoze.who-2.4/repoze/who/tests/test__compat.py
HINT: remove __pycache__ / .pyc files and/or use a unique basename for your test file modules
______________________________________________________________ ERROR collecting repoze/who/tests/test_api.py _______________________________________________________________
import file mismatch:
imported module 'repoze.who.tests.test_api' has this __file__ attribute:
  /home/tkloczko/rpmbuild/BUILDROOT/python-repoze-who-2.4-5.fc35.x86_64/usr/lib/python3.8/site-packages/repoze/who/tests/test_api.py
which is not the same as the test file we want to collect:
  /home/tkloczko/rpmbuild/BUILD/repoze.who-2.4/repoze/who/tests/test_api.py
HINT: remove __pycache__ / .pyc files and/or use a unique basename for your test file modules
__________________________________________________________ ERROR collecting repoze/who/tests/test_classifiers.py ___________________________________________________________
import file mismatch:
imported module 'repoze.who.tests.test_classifiers' has this __file__ attribute:
  /home/tkloczko/rpmbuild/BUILDROOT/python-repoze-who-2.4-5.fc35.x86_64/usr/lib/python3.8/site-packages/repoze/who/tests/test_classifiers.py
which is not the same as the test file we want to collect:
  /home/tkloczko/rpmbuild/BUILD/repoze.who-2.4/repoze/who/tests/test_classifiers.py
HINT: remove __pycache__ / .pyc files and/or use a unique basename for your test file modules
_____________________________________________________________ ERROR collecting repoze/who/tests/test_config.py _____________________________________________________________
import file mismatch:
imported module 'repoze.who.tests.test_config' has this __file__ attribute:
  /home/tkloczko/rpmbuild/BUILDROOT/python-repoze-who-2.4-5.fc35.x86_64/usr/lib/python3.8/site-packages/repoze/who/tests/test_config.py
which is not the same as the test file we want to collect:
  /home/tkloczko/rpmbuild/BUILD/repoze.who-2.4/repoze/who/tests/test_config.py
HINT: remove __pycache__ / .pyc files and/or use a unique basename for your test file modules
___________________________________________________________ ERROR collecting repoze/who/tests/test_middleware.py ___________________________________________________________
import file mismatch:
imported module 'repoze.who.tests.test_middleware' has this __file__ attribute:
  /home/tkloczko/rpmbuild/BUILDROOT/python-repoze-who-2.4-5.fc35.x86_64/usr/lib/python3.8/site-packages/repoze/who/tests/test_middleware.py
which is not the same as the test file we want to collect:
  /home/tkloczko/rpmbuild/BUILD/repoze.who-2.4/repoze/who/tests/test_middleware.py
HINT: remove __pycache__ / .pyc files and/or use a unique basename for your test file modules
____________________________________________________________ ERROR collecting repoze/who/tests/test_restrict.py ____________________________________________________________
import file mismatch:
imported module 'repoze.who.tests.test_restrict' has this __file__ attribute:
  /home/tkloczko/rpmbuild/BUILDROOT/python-repoze-who-2.4-5.fc35.x86_64/usr/lib/python3.8/site-packages/repoze/who/tests/test_restrict.py
which is not the same as the test file we want to collect:
  /home/tkloczko/rpmbuild/BUILD/repoze.who-2.4/repoze/who/tests/test_restrict.py
HINT: remove __pycache__ / .pyc files and/or use a unique basename for your test file modules
========================================================================= short test summary info ==========================================================================
ERROR repoze/who/plugins/tests/test_authtkt.py
ERROR repoze/who/plugins/tests/test_basicauth.py
ERROR repoze/who/plugins/tests/test_htpasswd.py
ERROR repoze/who/plugins/tests/test_redirector.py
ERROR repoze/who/plugins/tests/test_sql.py
ERROR repoze/who/tests/test__auth_tkt.py
ERROR repoze/who/tests/test__compat.py
ERROR repoze/who/tests/test_api.py
ERROR repoze/who/tests/test_classifiers.py
ERROR repoze/who/tests/test_config.py
ERROR repoze/who/tests/test_middleware.py
ERROR repoze/who/tests/test_restrict.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 12 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
============================================================================ 12 errors in 0.40s ============================================================================

No POST possible after API-Factory is initialized in Pyramid app

Hi,

we are using repoze.who in a Pyramid application for SSO via pysaml2. We are using an authentication policy similar to the one found in the pyramid_who project (https://github.com/Pylons/pyramid_who/blob/master/pyramid_who/whov2.py). However, as soon the policy is enabled, our application is not able to process POSTed data anymore.

For example, a POST of size 3808 bytes failes with

DisconnectionError: The client disconnected while sending the POST/PUT body (3808 more bytes were expected)

This behaviour only occurs if the return value of make_api_factory_with_config() self._api_factory is called. As soon as this line is commented out, POST requests start to work correctly again.

We are serving the application via pserve.

Any help is highly appreciated!

Converting identity['userdata'] to a dict breaks interactions with other plugins

With the changes from #18 it looks like interactions with other plugins are broken/affected.

I'm trying to use LDAP with auth_tkt and the ldap plugin and am getting the following error:

File '/home/jsivak/projects/cahps_dash_ve/lib/python2.7/site-packages/weberror/errormiddleware.py', line 171 in __call__         
  app_iter = self.application(environ, sr_checker)                                                                               
File '/home/jsivak/projects/cahps_dash_ve/lib/python2.7/site-packages/timermiddleware/__init__.py', line 221 in __call__         
  resp = req.get_response(self.app)                                                                                              
File '/home/jsivak/projects/cahps_dash_ve/lib/python2.7/site-packages/webob/request.py', line 1299 in send                       
  application, catch_exc_info=False)                                                                                             
File '/home/jsivak/projects/cahps_dash_ve/lib/python2.7/site-packages/webob/request.py', line 1263 in call_application           
  app_iter = application(self.environ, start_response)                                                                           
File '/home/jsivak/projects/cahps_dash_ve/lib/python2.7/site-packages/repoze/who/middleware.py', line 116 in __call__            
  remember_headers = api.remember()                                                                                              
File '/home/jsivak/projects/cahps_dash_ve/lib/python2.7/site-packages/repoze/who/api.py', line 211 in remember                   
  got_headers = identifier.remember(self.environ, identity)                                                                      
File '/home/jsivak/projects/cahps_dash_ve/lib/python2.7/site-packages/repoze/who/plugins/friendlyform.py', line 255 in remember  
  return rememberer.remember(environ, identity)                                                                                  
File '/home/jsivak/projects/cahps_dash_ve/lib/python2.7/site-packages/repoze/who/plugins/auth_tkt.py', line 142 in remember      
  who_userdata_dict[self.userid_typename] = encoding                                                                             
TypeError: 'str' object does not support item assignment                                                                         

It's probably due to the ldap plugin not returning a dictionary in identity['userdata'].

Is the expectation to update the repoze.who.plugins.ldap plugin? I imagine many plugins would be affected by this.

Thanks

Plans for a new pypi release?

Greetings! I was wondering if there were plans to do a version bump on pypi containing the recent changes to auth_tkt and userdata (#18)?

Thanks!

Tests fails with zope.interface>=5.x.x

After update to zope.interface-5.1.0 test fails.

Reported on redhat bugzilla:
https://bugzilla.redhat.com/show_bug.cgi?id=1825462

running test
WARNING: Testing via this command is deprecated and will be removed in a future version. Users looking for a generic test entry point independent of test runner are encouraged to use tox.
running egg_info
writing repoze.who.egg-info/PKG-INFO
writing dependency_links to repoze.who.egg-info/dependency_links.txt
writing entry points to repoze.who.egg-info/entry_points.txt
writing namespace_packages to repoze.who.egg-info/namespace_packages.txt
writing requirements to repoze.who.egg-info/requires.txt
writing top-level names to repoze.who.egg-info/top_level.txt
reading manifest file 'repoze.who.egg-info/SOURCES.txt'
writing manifest file 'repoze.who.egg-info/SOURCES.txt'
running build_ext
test___call___no_identity_returns_False (repoze.who.tests.test_restrict.AuthenticatedPredicateTests) ... ok
test___call___w_REMOTE_AUTH_returns_True (repoze.who.tests.test_restrict.AuthenticatedPredicateTests) ... ok
test___call___w_repoze_who_identity_returns_True (repoze.who.tests.test_restrict.AuthenticatedPredicateTests) ... ok
test_enabled (repoze.who.tests.test_restrict.MakeAuthenticatedRestrictionTests) ... ok
test_disabled_non_string_predicate_w_args (repoze.who.tests.test_restrict.MakePredicateRestrictionTests) ... ok
test_enabled_string_predicate_w_args (repoze.who.tests.test_restrict.MakePredicateRestrictionTests) ... ok
test_non_string_predicate_no_args (repoze.who.tests.test_restrict.MakePredicateRestrictionTests) ... ok
test___call___disabled_predicate_false_calls_app_not_predicate (repoze.who.tests.test_restrict.PredicateRestrictionTests) ... ok
test___call___enabled_predicate_false_returns_401 (repoze.who.tests.test_restrict.PredicateRestrictionTests) ... ok
test___call___enabled_predicate_true_calls_app (repoze.who.tests.test_restrict.PredicateRestrictionTests) ... ok
test_it_no_WHO_LOG_in_environ (repoze.who.tests.test_middleware.TestMakeTestMiddleware) ... ok
test_it_w_WHO_LOG_in_environ (repoze.who.tests.test_middleware.TestMakeTestMiddleware) ... ok
test_call_200_challenger_and_identifier_and_authenticator (repoze.who.tests.test_middleware.TestMiddleware) ... ok
test_call_200_identity_reset (repoze.who.tests.test_middleware.TestMiddleware) ... ok
test_call_200_no_challengers (repoze.who.tests.test_middleware.TestMiddleware) ... ok
test_call_200_no_challengers_app_calls_forget (repoze.who.tests.test_middleware.TestMiddleware) ... ok
test_call_200_no_plugins (repoze.who.tests.test_middleware.TestMiddleware) ... ok
test_call_200_with_metadata (repoze.who.tests.test_middleware.TestMiddleware) ... ok
test_call_401_challenger_and_identifier_and_authenticator (repoze.who.tests.test_middleware.TestMiddleware) ... ok
test_call_401_challenger_and_identifier_no_authenticator (repoze.who.tests.test_middleware.TestMiddleware) ... ok
test_call_401_no_challengers (repoze.who.tests.test_middleware.TestMiddleware) ... ok
test_call_401_no_identifiers (repoze.who.tests.test_middleware.TestMiddleware) ... ok
test_call_app_doesnt_call_start_response (repoze.who.tests.test_middleware.TestMiddleware) ... ok
test_call_ingress_plugin_replaces_application (repoze.who.tests.test_middleware.TestMiddleware) ... ok
test_call_remoteuser_already_set (repoze.who.tests.test_middleware.TestMiddleware) ... ok
test_call_w_challenge_but_no_challenger_still_closes_iterable (repoze.who.tests.test_middleware.TestMiddleware) ... ok
test_call_w_challenge_closes_iterable (repoze.who.tests.test_middleware.TestMiddleware) ... ok
test_ctor_accepts_logger (repoze.who.tests.test_middleware.TestMiddleware) ... ok
test_ctor_positional_args (repoze.who.tests.test_middleware.TestMiddleware) ... ok
test_ctor_w_classifier (repoze.who.tests.test_middleware.TestMiddleware) ... ok
test_ctor_w_request_classifier_and_classifier_raises (repoze.who.tests.test_middleware.TestMiddleware) ... ok
test_ctor_wo_challenge_decider_raises (repoze.who.tests.test_middleware.TestMiddleware) ... ok
test_ctor_wo_request_classifier_or_classifier_raises (repoze.who.tests.test_middleware.TestMiddleware) ... ok
test_ctor (repoze.who.tests.test_middleware.TestStartResponseWrapper) ... ok
test_finish_response (repoze.who.tests.test_middleware.TestStartResponseWrapper) ... ok
test_w_empty_generator (repoze.who.tests.test_middleware.WrapGeneratorTests) ... ok
test_w_generator (repoze.who.tests.test_middleware.WrapGeneratorTests) ... ok
test_w_iterator_having_close (repoze.who.tests.test_middleware.WrapGeneratorTests) ... ok
test_emit_doesnt_raise_NotImplementedError (repoze.who.tests.test_config.NullHandlerTests) ... ok
test_inheritance (repoze.who.tests.test_config.NullHandlerTests) ... ok
test_sample_config (repoze.who.tests.test_config.TestConfigMiddleware) ... ok
test_sample_config_no_log_level (repoze.who.tests.test_config.TestConfigMiddleware) ... ok
test_sample_config_w_log_file (repoze.who.tests.test_config.TestConfigMiddleware) ... ok
test_sample_config_wo_log_file (repoze.who.tests.test_config.TestConfigMiddleware) ... ok
test_defaults_before_parse (repoze.who.tests.test_config.TestWhoConfig) ... ok
test_parse_authenticators_only (repoze.who.tests.test_config.TestWhoConfig) ... ok
test_parse_authenticators_with_plugins (repoze.who.tests.test_config.TestWhoConfig) ... ok
test_parse_challengers_only (repoze.who.tests.test_config.TestWhoConfig) ... ok
test_parse_challengers_with_plugins (repoze.who.tests.test_config.TestWhoConfig) ... ok
test_parse_empty_file (repoze.who.tests.test_config.TestWhoConfig) ... ok
test_parse_empty_string (repoze.who.tests.test_config.TestWhoConfig) ... ok
test_parse_general_empty (repoze.who.tests.test_config.TestWhoConfig) ... ok
test_parse_general_only (repoze.who.tests.test_config.TestWhoConfig) ... ok
test_parse_general_with_plugins (repoze.who.tests.test_config.TestWhoConfig) ... ok
test_parse_identifiers_only (repoze.who.tests.test_config.TestWhoConfig) ... ok
test_parse_identifiers_with_plugins (repoze.who.tests.test_config.TestWhoConfig) ... ok
test_parse_make_plugin_names (repoze.who.tests.test_config.TestWhoConfig) ... ok
test_parse_mdproviders_only (repoze.who.tests.test_config.TestWhoConfig) ... ok
test_parse_mdproviders_with_plugins (repoze.who.tests.test_config.TestWhoConfig) ... ok
test_parse_plugins (repoze.who.tests.test_config.TestWhoConfig) ... ok
test_bad_config_content (repoze.who.tests.test_config.Test_make_api_factory_with_config) ... ok
test_bad_config_filename (repoze.who.tests.test_config.Test_make_api_factory_with_config) ... ok
test_sample_config_no_logger (repoze.who.tests.test_config.Test_make_api_factory_with_config) ... ok
test_sample_config_w_logger (repoze.who.tests.test_config.Test_make_api_factory_with_config) ... ok
test_sample_config_w_remote_user_key (repoze.who.tests.test_config.Test_make_api_factory_with_config) ... ok
test_challenges_on_401 (repoze.who.tests.test_classifiers.TestDefaultChallengeDecider) ... ok
test_conforms_to_IChallengeDecider (repoze.who.tests.test_classifiers.TestDefaultChallengeDecider) ... ok
test_doesnt_challenges_on_non_401 (repoze.who.tests.test_classifiers.TestDefaultChallengeDecider) ... ok
test_classify_browser (repoze.who.tests.test_classifiers.TestDefaultRequestClassifier) ... ok
test_classify_dav_method (repoze.who.tests.test_classifiers.TestDefaultRequestClassifier) ... ok
test_classify_dav_useragent (repoze.who.tests.test_classifiers.TestDefaultRequestClassifier) ... ok
test_classify_rich_xmlpost (repoze.who.tests.test_classifiers.TestDefaultRequestClassifier)
RFC 2046, sec. 4.1.2: A critical parameter that may be specified ... ok
test_classify_xmlpost (repoze.who.tests.test_classifiers.TestDefaultRequestClassifier) ... ok
test_classify_xmlpost_uppercase (repoze.who.tests.test_classifiers.TestDefaultRequestClassifier)
RFC 2045, Sec. 5.1: The type, subtype, and parameter names ... ok
test_conforms_to_IRequestClassifier (repoze.who.tests.test_classifiers.TestDefaultRequestClassifier) ... ok
test_challenges_on_bare_401 (repoze.who.tests.test_classifiers.TestPassthroughChallengeDecider) ... ok
test_conforms_to_IChallengeDecider (repoze.who.tests.test_classifiers.TestPassthroughChallengeDecider) ... ok
test_doesnt_challenges_on_401_with_WWW_Authenticate (repoze.who.tests.test_classifiers.TestPassthroughChallengeDecider) ... ok
test_doesnt_challenges_on_401_with_text_html (repoze.who.tests.test_classifiers.TestPassthroughChallengeDecider) ... ok
test_doesnt_challenges_on_non_401 (repoze.who.tests.test_classifiers.TestPassthroughChallengeDecider) ... ok
test___call___empty_environ (repoze.who.tests.test_api.APIFactoryTests) ... ok
test___call___w_api_in_environ (repoze.who.tests.test_api.APIFactoryTests) ... ok
test_class_conforms_to_IAPIFactory (repoze.who.tests.test_api.APIFactoryTests) ... ok
test_ctor_defaults (repoze.who.tests.test_api.APIFactoryTests) ... ok
test_instance_conforms_to_IAPIFactory (repoze.who.tests.test_api.APIFactoryTests) ... ok
test__add_metadata (repoze.who.tests.test_api.APITests) ... ok
test__add_metadata_w_classification (repoze.who.tests.test_api.APITests) ... ok
test__authenticate_fail (repoze.who.tests.test_api.APITests) ... ok
test__authenticate_find_explicit_classifier (repoze.who.tests.test_api.APITests) ... ok
test__authenticate_find_implicit_classifier (repoze.who.tests.test_api.APITests) ... ok
test__authenticate_success (repoze.who.tests.test_api.APITests) ... ok
test__authenticate_success_multiresult (repoze.who.tests.test_api.APITests) ... ok
test__authenticate_success_skip_fail (repoze.who.tests.test_api.APITests) ... ok
test__authenticate_user_null_but_not_none (repoze.who.tests.test_api.APITests) ... ok
test__identify_fail (repoze.who.tests.test_api.APITests) ... ok
test__identify_find_explicit_classifier (repoze.who.tests.test_api.APITests) ... ok
test__identify_find_implicit_classifier (repoze.who.tests.test_api.APITests) ... ok
test__identify_success (repoze.who.tests.test_api.APITests) ... ok
test__identify_success_empty_identity (repoze.who.tests.test_api.APITests) ... ok
test__identify_success_multiresults (repoze.who.tests.test_api.APITests) ... ok
test__identify_success_skip_noresults (repoze.who.tests.test_api.APITests) ... ok
test_authenticate_no_identities (repoze.who.tests.test_api.APITests) ... ok
test_authenticate_w_identities_no_authenticators (repoze.who.tests.test_api.APITests) ... ok
test_authenticate_w_identities_w_authenticators_hit (repoze.who.tests.test_api.APITests) ... ok
test_challenge_identifier_app_no_forget_headers (repoze.who.tests.test_api.APITests) ... ok
test_challenge_identifier_no_app_forget_headers (repoze.who.tests.test_api.APITests) ... ok
test_challenge_identifier_no_app_no_forget_headers (repoze.who.tests.test_api.APITests) ... ok
test_challenge_noidentifier_noapp (repoze.who.tests.test_api.APITests) ... ok
test_challenge_noidentifier_with_app (repoze.who.tests.test_api.APITests) ... ok
test_class_conforms_to_IAPI (repoze.who.tests.test_api.APITests) ... ok
test_ctor_accepts_logger_instance (repoze.who.tests.test_api.APITests) ... ok
test_forget_identifier_plugin_returns_none (repoze.who.tests.test_api.APITests) ... ok
test_forget_no_identity_passed_but_in_environ (repoze.who.tests.test_api.APITests) ... ok
test_forget_no_identity_passed_or_in_environ (repoze.who.tests.test_api.APITests) ... ok
test_forget_w_identity_passed_no_identifier (repoze.who.tests.test_api.APITests) ... ok
test_forget_w_identity_passed_w_identifier (repoze.who.tests.test_api.APITests) ... ok
test_login_w_identifier_name_hit (repoze.who.tests.test_api.APITests) ... ok
test_login_w_identifier_name_miss (repoze.who.tests.test_api.APITests) ... ok
test_login_wo_identifier_name_hit (repoze.who.tests.test_api.APITests) ... ok
test_logout_removes_repoze_who_identity (repoze.who.tests.test_api.APITests) ... ok
test_logout_w_identifier_name (repoze.who.tests.test_api.APITests) ... ok
test_logout_wo_identifier_name (repoze.who.tests.test_api.APITests) ... ok
test_logout_wo_identifier_name_miss (repoze.who.tests.test_api.APITests) ... ok
test_multi_challenge_firstwins (repoze.who.tests.test_api.APITests) ... ok
test_multi_challenge_skipnomatch_findexplicit (repoze.who.tests.test_api.APITests) ... ok
test_multi_challenge_skipnomatch_findimplicit (repoze.who.tests.test_api.APITests) ... ok
test_remember_identifier_plugin_returns_none (repoze.who.tests.test_api.APITests) ... ok
test_remember_no_identity_passed_but_in_environ (repoze.who.tests.test_api.APITests) ... ok
test_remember_no_identity_passed_or_in_environ (repoze.who.tests.test_api.APITests) ... ok
test_remember_w_identity_passed_no_identifier (repoze.who.tests.test_api.APITests) ... ok
test_remember_w_identity_passed_w_identifier (repoze.who.tests.test_api.APITests) ... ok
test_repr (repoze.who.tests.test_api.TestIdentityDict) ... ok
test_str (repoze.who.tests.test_api.TestIdentityDict) ... ok
test_brokenimpl (repoze.who.tests.test_api.TestMakeRegistries) ... ERROR
test_empty (repoze.who.tests.test_api.TestMakeRegistries) ... ok
test_ok (repoze.who.tests.test_api.TestMakeRegistries) ... ok
test_match_classification (repoze.who.tests.test_api.TestMatchClassification) ... ok
test___call___empty_environ (repoze.who.tests.test_api.Test_get_api) ... ok
test___call___w_api_in_environ (repoze.who.tests.test_api.Test_get_api) ... ok
test_AUTHORIZATION_hit (repoze.who.tests.test__compat.CompatTests) ... ok
test_AUTHORIZATION_miss (repoze.who.tests.test__compat.CompatTests) ... ok
test_CONTENT_TYPE_hit (repoze.who.tests.test__compat.CompatTests) ... ok
test_CONTENT_TYPE_miss (repoze.who.tests.test__compat.CompatTests) ... ok
test_REQUEST_METHOD_hit (repoze.who.tests.test__compat.CompatTests) ... ok
test_REQUEST_METHOD_miss (repoze.who.tests.test__compat.CompatTests) ... ok
test_USER_AGENT_hit (repoze.who.tests.test__compat.CompatTests) ... ok
test_USER_AGENT_miss (repoze.who.tests.test__compat.CompatTests) ... ok
test_construct_url (repoze.who.tests.test__compat.CompatTests) ... ok
test_get_cookies_no_cache_ok_header_value (repoze.who.tests.test__compat.CompatTests) ... ok
test_get_cookies_w_cache_hit (repoze.who.tests.test__compat.CompatTests) ... ok
test_get_cookies_w_cache_miss (repoze.who.tests.test__compat.CompatTests) ... ok
test_header_value_miss (repoze.who.tests.test__compat.CompatTests) ... ok
test_header_value_simple (repoze.who.tests.test__compat.CompatTests) ... ok
test_must_decode_latin1 (repoze.who.tests.test__compat.CompatTests) ... ok
test_must_decode_non_string (repoze.who.tests.test__compat.CompatTests) ... ok
test_must_decode_unicode (repoze.who.tests.test__compat.CompatTests) ... ok
test_must_decode_utf8 (repoze.who.tests.test__compat.CompatTests) ... ok
test_must_encode_latin1 (repoze.who.tests.test__compat.CompatTests) ... ok
test_must_encode_non_string (repoze.who.tests.test__compat.CompatTests) ... ok
test_must_encode_unicode (repoze.who.tests.test__compat.CompatTests) ... ok
test_must_encode_utf8 (repoze.who.tests.test__compat.CompatTests) ... ok
test_cookie_not_secure_wo_tokens_or_userdata (repoze.who.tests.test__auth_tkt.AuthTicketTests) ... ok
test_cookie_secure_w_tokens_and_userdata (repoze.who.tests.test__auth_tkt.AuthTicketTests) ... ok
test_cookie_value_w_tokens_and_userdata (repoze.who.tests.test__auth_tkt.AuthTicketTests) ... ok
test_cookie_value_wo_tokens_or_userdata (repoze.who.tests.test__auth_tkt.AuthTicketTests) ... ok
test_ctor_defaults (repoze.who.tests.test__auth_tkt.AuthTicketTests) ... ok
test_ctor_explicit (repoze.who.tests.test__auth_tkt.AuthTicketTests) ... ok
test_ctor_string_algorithm (repoze.who.tests.test__auth_tkt.AuthTicketTests) ... ok
test_digest (repoze.who.tests.test__auth_tkt.AuthTicketTests) ... ok
test_w_expected (repoze.who.tests.test__auth_tkt.BadTicketTests) ... ok
test_wo_expected (repoze.who.tests.test__auth_tkt.BadTicketTests) ... ok
test_encode_ip_timestamp (repoze.who.tests.test__auth_tkt.Test_helpers) ... ok
test_ints_to_bytes (repoze.who.tests.test__auth_tkt.Test_helpers) ... ok
test_maybe_encode_bytes (repoze.who.tests.test__auth_tkt.Test_helpers) ... ok
test_maybe_encode_native_string (repoze.who.tests.test__auth_tkt.Test_helpers) ... ok
test_maybe_encode_unicode (repoze.who.tests.test__auth_tkt.Test_helpers) ... ok
test_bad_timestamp (repoze.who.tests.test__auth_tkt.Test_parse_ticket) ... ok
test_no_bang_after_userid (repoze.who.tests.test__auth_tkt.Test_parse_ticket) ... ok
test_w_tokens_and_data_ok_alternate_digest (repoze.who.tests.test__auth_tkt.Test_parse_ticket) ... ok
test_w_tokens_and_data_ok_digest (repoze.who.tests.test__auth_tkt.Test_parse_ticket) ... ok
test_wo_tokens_or_data_bad_digest (repoze.who.tests.test__auth_tkt.Test_parse_ticket) ... ok
test_wo_tokens_or_data_ok_digest (repoze.who.tests.test__auth_tkt.Test_parse_ticket) ... ok
test_noprefix_fail (repoze.who.plugins.tests.test_sql.TestDefaultPasswordCompare) ... ok
test_noprefix_success (repoze.who.plugins.tests.test_sql.TestDefaultPasswordCompare) ... ok
test_shaprefix_fail (repoze.who.plugins.tests.test_sql.TestDefaultPasswordCompare) ... ok
test_shaprefix_success (repoze.who.plugins.tests.test_sql.TestDefaultPasswordCompare) ... ok
test_shaprefix_w_unicode_cleartext (repoze.who.plugins.tests.test_sql.TestDefaultPasswordCompare) ... ok
test_bad_connfactory (repoze.who.plugins.tests.test_sql.TestMakeSQLAuthenticatorPlugin) ... ok
test_comparefunc_specd (repoze.who.plugins.tests.test_sql.TestMakeSQLAuthenticatorPlugin) ... ok
test_connfactory_specd (repoze.who.plugins.tests.test_sql.TestMakeSQLAuthenticatorPlugin) ... ok
test_no_connfactory (repoze.who.plugins.tests.test_sql.TestMakeSQLAuthenticatorPlugin) ... ok
test_noquery (repoze.who.plugins.tests.test_sql.TestMakeSQLAuthenticatorPlugin) ... ok
test_bad_connfactory (repoze.who.plugins.tests.test_sql.TestMakeSQLMetadataProviderPlugin) ... ok
test_comparefn_specd (repoze.who.plugins.tests.test_sql.TestMakeSQLMetadataProviderPlugin) ... ok
test_connfactory_specd (repoze.who.plugins.tests.test_sql.TestMakeSQLMetadataProviderPlugin) ... ok
test_no_connfactory (repoze.who.plugins.tests.test_sql.TestMakeSQLMetadataProviderPlugin) ... ok
test_no_name (repoze.who.plugins.tests.test_sql.TestMakeSQLMetadataProviderPlugin) ... ok
test_no_query (repoze.who.plugins.tests.test_sql.TestMakeSQLMetadataProviderPlugin) ... ok
test_authenticate_comparefail (repoze.who.plugins.tests.test_sql.TestSQLAuthenticatorPlugin) ... ok
test_authenticate_comparesuccess (repoze.who.plugins.tests.test_sql.TestSQLAuthenticatorPlugin) ... ok
test_authenticate_nologin (repoze.who.plugins.tests.test_sql.TestSQLAuthenticatorPlugin) ... ok
test_authenticate_noresults (repoze.who.plugins.tests.test_sql.TestSQLAuthenticatorPlugin) ... ok
test_implements (repoze.who.plugins.tests.test_sql.TestSQLAuthenticatorPlugin) ... ok
test_add_metadata (repoze.who.plugins.tests.test_sql.TestSQLMetadataProviderPlugin) ... ok
test_implements (repoze.who.plugins.tests.test_sql.TestSQLMetadataProviderPlugin) ... ok
test_challenge (repoze.who.plugins.tests.test_redirector.TestRedirectorPlugin) ... ok
test_challenge_w_reason_no_reason_param_no_came_from_param (repoze.who.plugins.tests.test_redirector.TestRedirectorPlugin) ... ok
test_challenge_w_reason_no_reason_param_w_came_from_param (repoze.who.plugins.tests.test_redirector.TestRedirectorPlugin) ... ok
test_challenge_with_custom_reason_header (repoze.who.plugins.tests.test_redirector.TestRedirectorPlugin) ... ok
test_challenge_with_reason_and_custom_reason_param (repoze.who.plugins.tests.test_redirector.TestRedirectorPlugin) ... ok
test_challenge_with_reason_header (repoze.who.plugins.tests.test_redirector.TestRedirectorPlugin) ... ok
test_challenge_with_setcookie_from_app (repoze.who.plugins.tests.test_redirector.TestRedirectorPlugin) ... ok
test_challenge_wo_reason_w_came_from_param (repoze.who.plugins.tests.test_redirector.TestRedirectorPlugin) ... ok
test_class_conforms_to_IChallenger (repoze.who.plugins.tests.test_redirector.TestRedirectorPlugin) ... ok
test_ctor_w_reason_param_wo_reason_header (repoze.who.plugins.tests.test_redirector.TestRedirectorPlugin) ... ok
test_ctor_wo_reason_param_w_reason_header (repoze.who.plugins.tests.test_redirector.TestRedirectorPlugin) ... ok
test_instance_conforms_to_IChallenger (repoze.who.plugins.tests.test_redirector.TestRedirectorPlugin) ... ok
test_defaults (repoze.who.plugins.tests.test_redirector.Test_make_redirecting_plugin) ... ok
test_explicit_came_from_param (repoze.who.plugins.tests.test_redirector.Test_make_redirecting_plugin) ... ok
test_explicit_reason_header_param (repoze.who.plugins.tests.test_redirector.Test_make_redirecting_plugin) ... ok
test_explicit_reason_header_param_no_reason_param_raises (repoze.who.plugins.tests.test_redirector.Test_make_redirecting_plugin) ... ok
test_explicit_reason_param (repoze.who.plugins.tests.test_redirector.Test_make_redirecting_plugin) ... ok
test_no_login_url_raises (repoze.who.plugins.tests.test_redirector.Test_make_redirecting_plugin) ... ok
test_authenticate_bad_filename_logs_to_repoze_who_logger (repoze.who.plugins.tests.test_htpasswd.TestHTPasswdPlugin) ... ok
test_authenticate_badline (repoze.who.plugins.tests.test_htpasswd.TestHTPasswdPlugin) ... ok
test_authenticate_filename (repoze.who.plugins.tests.test_htpasswd.TestHTPasswdPlugin) ... ok
test_authenticate_match (repoze.who.plugins.tests.test_htpasswd.TestHTPasswdPlugin) ... ok
test_authenticate_nocreds (repoze.who.plugins.tests.test_htpasswd.TestHTPasswdPlugin) ... ok
test_authenticate_nolines (repoze.who.plugins.tests.test_htpasswd.TestHTPasswdPlugin) ... ok
test_authenticate_nousermatch (repoze.who.plugins.tests.test_htpasswd.TestHTPasswdPlugin) ... ok
test_crypt_check (repoze.who.plugins.tests.test_htpasswd.TestHTPasswdPlugin) ... ok
test_factory (repoze.who.plugins.tests.test_htpasswd.TestHTPasswdPlugin) ... ok
test_factory_no_check_fn_raises (repoze.who.plugins.tests.test_htpasswd.TestHTPasswdPlugin) ... ok
test_factory_no_filename_raises (repoze.who.plugins.tests.test_htpasswd.TestHTPasswdPlugin) ... ok
test_implements (repoze.who.plugins.tests.test_htpasswd.TestHTPasswdPlugin) ... ok
test_plain_check (repoze.who.plugins.tests.test_htpasswd.TestHTPasswdPlugin) ... ok
test_sha1_check (repoze.who.plugins.tests.test_htpasswd.TestHTPasswdPlugin) ... ok
test_challenge (repoze.who.plugins.tests.test_basicauth.TestBasicAuthPlugin) ... ok
test_challenge_forgetheaders_includes (repoze.who.plugins.tests.test_basicauth.TestBasicAuthPlugin) ... ok
test_challenge_forgetheaders_omits (repoze.who.plugins.tests.test_basicauth.TestBasicAuthPlugin) ... ok
test_factory (repoze.who.plugins.tests.test_basicauth.TestBasicAuthPlugin) ... ok
test_forget (repoze.who.plugins.tests.test_basicauth.TestBasicAuthPlugin) ... ok
test_identify_basic_badencoding (repoze.who.plugins.tests.test_basicauth.TestBasicAuthPlugin) ... ok
test_identify_basic_badrepr (repoze.who.plugins.tests.test_basicauth.TestBasicAuthPlugin) ... ok
test_identify_basic_ok (repoze.who.plugins.tests.test_basicauth.TestBasicAuthPlugin) ... ok
test_identify_basic_ok_latin1_values (repoze.who.plugins.tests.test_basicauth.TestBasicAuthPlugin) ... ok
test_identify_basic_ok_utf8_values (repoze.who.plugins.tests.test_basicauth.TestBasicAuthPlugin) ... ok
test_identify_noauthinfo (repoze.who.plugins.tests.test_basicauth.TestBasicAuthPlugin) ... ok
test_identify_nonbasic (repoze.who.plugins.tests.test_basicauth.TestBasicAuthPlugin) ... ok
test_implements (repoze.who.plugins.tests.test_basicauth.TestBasicAuthPlugin) ... ok
test_remember (repoze.who.plugins.tests.test_basicauth.TestBasicAuthPlugin) ... ok
test_authenticate_non_auth_tkt_credentials (repoze.who.plugins.tests.test_authtkt.TestAuthTktCookiePlugin) ... ok
test_authenticate_with_checker_and_existing_account (repoze.who.plugins.tests.test_authtkt.TestAuthTktCookiePlugin) ... ok
test_authenticate_with_checker_and_non_existing_account (repoze.who.plugins.tests.test_authtkt.TestAuthTktCookiePlugin) ... ok
test_authenticate_without_checker (repoze.who.plugins.tests.test_authtkt.TestAuthTktCookiePlugin) ... ok
test_class_conforms_to_IAuthenticator (repoze.who.plugins.tests.test_authtkt.TestAuthTktCookiePlugin) ... ok
test_class_conforms_to_IIdentifier (repoze.who.plugins.tests.test_authtkt.TestAuthTktCookiePlugin) ... ok
test_factory_w_bad_secretfile_raises_ValueError (repoze.who.plugins.tests.test_authtkt.TestAuthTktCookiePlugin) ... ok
test_factory_w_secret (repoze.who.plugins.tests.test_authtkt.TestAuthTktCookiePlugin) ... ok
test_factory_w_secret_w_secretfile_raises_ValueError (repoze.who.plugins.tests.test_authtkt.TestAuthTktCookiePlugin) ... ok
test_factory_w_secretfile (repoze.who.plugins.tests.test_authtkt.TestAuthTktCookiePlugin) ... ok
test_factory_with_alternate_hash (repoze.who.plugins.tests.test_authtkt.TestAuthTktCookiePlugin) ... ok
test_factory_with_alternate_hash_func (repoze.who.plugins.tests.test_authtkt.TestAuthTktCookiePlugin) ... ok
test_factory_with_bogus_hash (repoze.who.plugins.tests.test_authtkt.TestAuthTktCookiePlugin) ... ok
test_factory_with_timeout_and_reissue_time (repoze.who.plugins.tests.test_authtkt.TestAuthTktCookiePlugin) ... ok
test_factory_with_userid_checker (repoze.who.plugins.tests.test_authtkt.TestAuthTktCookiePlugin) ... ok
test_factory_wo_secret_wo_secretfile_raises_ValueError (repoze.who.plugins.tests.test_authtkt.TestAuthTktCookiePlugin) ... ok
test_forget (repoze.who.plugins.tests.test_authtkt.TestAuthTktCookiePlugin) ... ok
test_identify_bad_cookie (repoze.who.plugins.tests.test_authtkt.TestAuthTktCookiePlugin) ... ok
test_identify_bad_cookie_expired (repoze.who.plugins.tests.test_authtkt.TestAuthTktCookiePlugin) ... ok
test_identify_bad_cookie_with_alternate_hash (repoze.who.plugins.tests.test_authtkt.TestAuthTktCookiePlugin) ... ok
test_identify_good_cookie_dont_include_ip (repoze.who.plugins.tests.test_authtkt.TestAuthTktCookiePlugin) ... ok
test_identify_good_cookie_include_ip (repoze.who.plugins.tests.test_authtkt.TestAuthTktCookiePlugin) ... ok
test_identify_good_cookie_int_useridtype (repoze.who.plugins.tests.test_authtkt.TestAuthTktCookiePlugin) ... ok
test_identify_good_cookie_unknown_useridtype (repoze.who.plugins.tests.test_authtkt.TestAuthTktCookiePlugin) ... ok
test_identify_nocookie (repoze.who.plugins.tests.test_authtkt.TestAuthTktCookiePlugin) ... ok
test_identify_with_alternate_hash (repoze.who.plugins.tests.test_authtkt.TestAuthTktCookiePlugin) ... ok
test_identify_with_checker_and_existing_account (repoze.who.plugins.tests.test_authtkt.TestAuthTktCookiePlugin) ... ok
test_instance_conforms_to_IAuthenticator (repoze.who.plugins.tests.test_authtkt.TestAuthTktCookiePlugin) ... ok
test_instance_conforms_to_IIdentifier (repoze.who.plugins.tests.test_authtkt.TestAuthTktCookiePlugin) ... ok
test_l10n_sane_cookie_date (repoze.who.plugins.tests.test_authtkt.TestAuthTktCookiePlugin) ... ok
test_remember_creds_different (repoze.who.plugins.tests.test_authtkt.TestAuthTktCookiePlugin) ... ok
test_remember_creds_different_bad_old_cookie (repoze.who.plugins.tests.test_authtkt.TestAuthTktCookiePlugin) ... ok
test_remember_creds_different_include_ip (repoze.who.plugins.tests.test_authtkt.TestAuthTktCookiePlugin) ... ok
test_remember_creds_different_int_userid (repoze.who.plugins.tests.test_authtkt.TestAuthTktCookiePlugin) ... ok
test_remember_creds_different_long_userid (repoze.who.plugins.tests.test_authtkt.TestAuthTktCookiePlugin) ... ok
test_remember_creds_different_strips_port (repoze.who.plugins.tests.test_authtkt.TestAuthTktCookiePlugin) ... ok
test_remember_creds_different_unicode_userid (repoze.who.plugins.tests.test_authtkt.TestAuthTktCookiePlugin) ... ok
test_remember_creds_different_with_tokens (repoze.who.plugins.tests.test_authtkt.TestAuthTktCookiePlugin) ... ok
test_remember_creds_different_with_tuple_tokens (repoze.who.plugins.tests.test_authtkt.TestAuthTktCookiePlugin) ... ok
test_remember_creds_hash_mismatch (repoze.who.plugins.tests.test_authtkt.TestAuthTktCookiePlugin) ... ok
test_remember_creds_reissue (repoze.who.plugins.tests.test_authtkt.TestAuthTktCookiePlugin) ... ok
test_remember_creds_reissue_alternate_hash (repoze.who.plugins.tests.test_authtkt.TestAuthTktCookiePlugin) ... ok
test_remember_creds_same (repoze.who.plugins.tests.test_authtkt.TestAuthTktCookiePlugin) ... ok
test_remember_creds_same_alternate_hash (repoze.who.plugins.tests.test_authtkt.TestAuthTktCookiePlugin) ... ok
test_remember_creds_samesite (repoze.who.plugins.tests.test_authtkt.TestAuthTktCookiePlugin) ... ok
test_remember_creds_secure (repoze.who.plugins.tests.test_authtkt.TestAuthTktCookiePlugin) ... ok
test_remember_creds_secure_alternate_hash (repoze.who.plugins.tests.test_authtkt.TestAuthTktCookiePlugin) ... ok
test_remember_max_age (repoze.who.plugins.tests.test_authtkt.TestAuthTktCookiePlugin) ... ok
test_remember_max_age_unicode (repoze.who.plugins.tests.test_authtkt.TestAuthTktCookiePlugin) ... ok
test_timeout_lower_than_reissue (repoze.who.plugins.tests.test_authtkt.TestAuthTktCookiePlugin) ... ok
test_timeout_no_reissue (repoze.who.plugins.tests.test_authtkt.TestAuthTktCookiePlugin) ... ok

======================================================================
ERROR: test_brokenimpl (repoze.who.tests.test_api.TestMakeRegistries)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/py/test1/repoze.who/repoze/who/tests/test_api.py", line 108, in test_brokenimpl
    [(None, object())], [], [], [])
  File "/usr/lib64/python3.7/unittest/case.py", line 756, in assertRaises
    return context.handle('assertRaises', args, kwargs)
  File "/usr/lib64/python3.7/unittest/case.py", line 178, in handle
    callable_obj(*args, **kwargs)
  File "/tmp/py/test1/repoze.who/repoze/who/tests/test_api.py", line 99, in _callFUT
    challengers, mdproviders)
  File "/tmp/py/test1/repoze.who/repoze/who/api.py", line 72, in make_registries
    verify(value, iface)
  File "/tmp/py/test1/repoze.who/repoze/who/api.py", line 57, in verify
    verifyObject(iface, plugin, tentative=True)
  File "/tmp/py/test1/lib64/python3.7/site-packages/zope/interface/verify.py", line 172, in verifyObject
    return _verify(iface, candidate, tentative, vtype='o')
  File "/tmp/py/test1/lib64/python3.7/site-packages/zope/interface/verify.py", line 92, in _verify
    raise MultipleInvalid(iface, candidate, excs)
zope.interface.exceptions.MultipleInvalid: The object <object object at 0x7f4cf0f1c790> has failed to implement interface <InterfaceClass repoze.who.interfaces.IIdentifier>:
    The repoze.who.interfaces.IIdentifier.identify(environ) attribute was not provided
    The repoze.who.interfaces.IIdentifier.remember(environ, identity) attribute was not provided
    The repoze.who.interfaces.IIdentifier.forget(environ, identity) attribute was not provided

----------------------------------------------------------------------
Ran 302 tests in 0.052s

FAILED (errors=1)
Test failed: <unittest.runner.TextTestResult run=302 errors=1 failures=0>
error: Test failed: <unittest.runner.TextTestResult run=302 errors=1 failures=0>

add option to prevent execution of further plugins after first successfull plugin

The use case is:
You have multiple plugins. But some of them may be expensive to execute, so you only want to use them as fallback.
Currently all plugins are executed, even though one plugin has already been successful and there is no need to execute (and waste any time) by calling another plugin.

So I think there should be an option the allows me to prevent the execution of further plugins after the first successful plugin.

AuthTktCookiePlugin can't store user data

In auth_tkt.py there's a reminder:

        # XXX we are discarding the userdata passed in the identity?
        who_userdata = 'userid_type:%s' % encoding

This is true, I ran into this trying to pass some data across the login (in Turbogears 2.3). I have hacked it by replacing above two lines with:

        encoding = 'userid_type:%s' % encoding
        if who_userdata == '':
            who_userdata = encoding
        else:
            who_userdata = encoding + '|' + who_userdata

This is not optimal, as user must take care of escaping his userdata properly and avoiding conflict with userid_type. Please fix.

EntryPoint exception with older setuptools

It appears that you need quite a new version of setuptools with the latest repoze.who.

With repoze.who 2.3 I get an exception when using setuptools version before 11.3. Since that was released only January 2015, it seems plenty of people may be affected.

Something about this is mentioned in the setuptools changelog: http://setuptools.readthedocs.io/en/latest/history.html#id106

Here's the exact exception I see when running ckan:

(ckan)vagrant@precise64:/vagrant/src/ckan$ nosetests --reset-db --ckan
--with-pylons=test-core.ini ckan/tests -x
/home/vagrant/ckan/local/lib/python2.7/site-packages/pylons/templating.py:610:
UserWarning: Unbuilt egg for ckan [unknown version]
(/vagrant/src/ckan)
  Engine = entry_point.load()
Traceback (most recent call last):
  File "/home/vagrant/ckan/bin/nosetests", line 11, in <module>
    sys.exit(run_exit())
  File "/home/vagrant/ckan/local/lib/python2.7/site-packages/nose/core.py",
line 121, in __init__
    **extra_args)
  File "/usr/lib/python2.7/unittest/main.py", line 94, in __init__
    self.parseArgs(argv)
  File "/home/vagrant/ckan/local/lib/python2.7/site-packages/nose/core.py",
line 145, in parseArgs
    self.config.configure(argv, doc=self.usage())
  File "/home/vagrant/ckan/local/lib/python2.7/site-packages/nose/config.py",
line 347, in configure
    self.plugins.begin()
  File "/home/vagrant/ckan/local/lib/python2.7/site-packages/nose/plugins/manager.py",
line 99, in __call__
    return self.call(*arg, **kw)
  File "/home/vagrant/ckan/local/lib/python2.7/site-packages/nose/plugins/manager.py",
line 167, in simple
    result = meth(*arg, **kw)
  File "/home/vagrant/ckan/local/lib/python2.7/site-packages/pylons/test.py",
line 74, in begin
    relative_to=path)
  File "/home/vagrant/ckan/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py",
line 247, in loadapp
    return loadobj(APP, uri, name=name, **kw)
  File "/home/vagrant/ckan/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py",
line 272, in loadobj
    return context.create()
  File "/home/vagrant/ckan/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py",
line 710, in create
    return self.object_type.invoke(self)
  File "/home/vagrant/ckan/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py",
line 146, in invoke
    return fix_call(context.object, context.global_conf, **context.local_conf)
  File "/home/vagrant/ckan/local/lib/python2.7/site-packages/paste/deploy/util.py",
line 55, in fix_call
    val = callable(*args, **kw)
  File "/vagrant/src/ckan/ckan/config/middleware/__init__.py", line
48, in make_app
    **app_conf)
  File "/vagrant/src/ckan/ckan/config/middleware/pylons_app.py", line
113, in make_pylons_stack
    who_parser.parse(open(app_conf['who.config_file']))
  File "/home/vagrant/ckan/local/lib/python2.7/site-packages/repoze/who/config.py",
line 86, in parse
    obj = self._makePlugin(name, IPlugin, options)
  File "/home/vagrant/ckan/local/lib/python2.7/site-packages/repoze/who/config.py",
line 40, in _makePlugin
    obj = _resolve(name)
  File "/home/vagrant/ckan/local/lib/python2.7/site-packages/repoze/who/config.py",
line 23, in _resolve
    return EntryPoint.parse('x=%s' % name).resolve()
AttributeError: 'EntryPoint' object has no attribute 'resolve'

I didn't have this trouble with repoze.who==2.0 (I've not tried the versions in-between).

suppot py3

I wanna use greate authentication library with python3.

I think that needs few steps below::

step 1.
omit dependencies for paste and setuptools.
they don't support python3, but distribute and webob do.

step 2.
apply 2to3 or one source style approach.

I tried step1 at aodag@02a504e .
that passed all tests and looks works fine.

setp2 has few problems.

  • supporting python2.5 needs 2to3 to fix exception syntax.
  • type check of basestring does'nt work on python3.

regards

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.