Skip to content

Commit

Permalink
Added unit test and RFC reference
Browse files Browse the repository at this point in the history
  • Loading branch information
tflorac committed Jan 1, 2014
1 parent a5b44d4 commit d7aa9cf
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/zope/pluggableauth/plugins/httpplugins.py
Expand Up @@ -80,6 +80,14 @@ def extractCredentials(self, request):
>>> print(plugin.extractCredentials(TestRequest('/')))
None
According to RFC 2617, password can contain one or more colons;
user ID can't contain any colon.
>>> request = TextRequest(
... environ={'HTTP_AUTHORIZATION': u'Basic bWdyOm1ncnB3OndpdGg6Y29sb24='})
>>> pprint(plugin.extractCredentials(request))
{'login': u'mgr', 'password': u'mgrpw:with:colon'}
"""
if not IHTTPRequest.providedBy(request):
return None
Expand Down

0 comments on commit d7aa9cf

Please sign in to comment.