authapi.py

107 views
Skip to first unread message

Tito Garrido

unread,
May 13, 2019, 3:11:31 PM5/13/19
to web...@googlegroups.com
Hi Guys!

Is there any example using authapi + jwt in any documentation?

Thank you!

Tito

--

Linux User #387870
.........____
.... _/_õ|__|
..º[ .-.___.-._| . . . .
.__( o)__( o).:_______

Val K

unread,
May 13, 2019, 3:23:29 PM5/13/19
to web2py-users

Tito Garrido

unread,
May 14, 2019, 2:16:14 PM5/14/19
to web...@googlegroups.com

--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/97e19835-dce8-499d-aa2b-140641f862fa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tito Garrido

unread,
May 15, 2019, 10:22:17 AM5/15/19
to web...@googlegroups.com
When I try to use the code above with the @api_requires_login declared I am receiving:

JWT header not found and JWT parameter _token missing in request

Even for functions without the decorator, like:
def token():
    return myjwt.jwt_token_manager()

Any ideas why it is asking me this header?

Thank you!

Tito

Val K

unread,
May 16, 2019, 5:58:33 AM5/16/19
to web2py-users
Maybe it's also required some Auth setting at db.py


https://github.com/robertop23/web2py_vuejs_vuetify/blob/master/models/db.py

Alexei Vinidiktov

unread,
May 20, 2020, 2:38:11 AM5/20/20
to web2py-users
I was having the same problem with the latest web2py version (2.20.4) but it had worked fine with an earlier version of web2py (2.16.1).

To make it work, I had to remove lines 1315 and 1316 in gluon/tools.py.

if token is None:
raise HTTP(400, 'JWT header not found and JWT parameter {} missing in request'.format(token_param))

The two lines above were not part of earlier versions of web2py where jwt worked.

Do they serve a special purpose? Can they be safely removed?
To unsubscribe from this group and stop receiving emails from it, send an email to web...@googlegroups.com.


--

Linux User #387870
.........____
.... _/_õ|__|
..º[ .-.___.-._| . . . .
.__( o)__( o).:_______
Reply all
Reply to author
Forward
0 new messages