Created
March 14, 2016 14:08
-
-
Save vortec/d8adca10a75fabd13a0e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@hug.authentication.authenticator | |
def header_exists(request, response, verify_user, **kwargs): | |
print("yo") | |
return {'user': 'foo'} | |
@hug.get('/test', requires=header_exists) | |
def test(user: hug.directives.user): | |
return "hai" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Traceback (most recent call last): | |
File "/Users/fkochem/.pyenv/versions/3.5.0/lib/python3.5/wsgiref/handlers.py", line 137, in run | |
self.result = application(self.environ, self.start_response) | |
File "/Users/fkochem/workspace/instances/python3/lib/python3.5/site-packages/falcon/api.py", line 182, in __call__ | |
responder(req, resp, **params) | |
File "/Users/fkochem/workspace/code/hug/hug/interface.py", line 538, in __call__ | |
lacks_requirement = self.check_requirements(request, response) | |
File "/Users/fkochem/workspace/code/hug/hug/interface.py", line 173, in check_requirements | |
conclusion = requirement(response=response, request=request, module=self.api.module) | |
TypeError: wrapper() got an unexpected keyword argument 'response' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment