Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aiohttp Class Based Views login_required not working #52

Closed
citijk opened this issue Aug 13, 2018 · 3 comments
Closed

aiohttp Class Based Views login_required not working #52

citijk opened this issue Aug 13, 2018 · 3 comments
Assignees

Comments

@citijk
Copy link

citijk commented Aug 13, 2018

`class Auth(web.View):

@login_required
async def get(self):
    return web.json_response({stat='ok'})`

err:
aiohttp_jwt/permissions.py", line 23, in wrapped assert isinstance(request, web.Request) AssertionError

@citijk
Copy link
Author

citijk commented Aug 13, 2018

there is a solution. If we rewrite this:
`
@login_required
class Auth(web.View):

async def get(self):
    return web.json_response({stat='ok'})

`
It works.

@hzlmn
Copy link
Owner

hzlmn commented Aug 14, 2018

Hi, yep. It is current limitation. Gonna add support for it in a few days.

@hzlmn
Copy link
Owner

hzlmn commented Oct 24, 2018

Done in #53. v0.2 will be released in few hours.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants