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?

On Wednesday, May 15, 2019 at 9:22:17 PM UTC+7, Tito Garrido wrote:
>
> 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
>
> On Tue, May 14, 2019 at 3:15 PM Tito Garrido <titog...@gmail.com 
> <javascript:>> wrote:
>
>> Thank you, 
>>
>> https://github.com/robertop23/web2py_vuejs_vuetify/blob/master/controllers/api.py
>>
>> works for me!
>>
>> On Mon, May 13, 2019 at 4:23 PM Val K <valq...@gmail.com <javascript:>> 
>> wrote:
>>
>>> https://github.com/web2py/web2py/blob/4a90c82ee4271b2a17c187d41138a03249c14350/gluon/tools.py#L1002
>>>
>>>
>>>
>>>
>>>
>>> https://github.com/robertop23/web2py_vuejs_vuetify/blob/master/controllers/api.py
>>>
>>> On Monday, May 13, 2019 at 10:11:31 PM UTC+3, Tito Garrido wrote:
>>>>
>>>> Hi Guys!
>>>>
>>>> Is there any example using authapi + jwt in any documentation?
>>>>
>>>> Thank you!
>>>>
>>>> Tito
>>>>
>>>> -- 
>>>>
>>>> Linux User #387870
>>>> .........____
>>>> .... _/_õ|__|
>>>> ..º[ .-.___.-._| . . . .
>>>> .__( o)__( o).:_______
>>>>
>>> -- 
>>> 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 web...@googlegroups.com <javascript:>.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/web2py/97e19835-dce8-499d-aa2b-140641f862fa%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/web2py/97e19835-dce8-499d-aa2b-140641f862fa%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>> -- 
>>
>> Linux User #387870
>> .........____
>> .... _/_õ|__|
>> ..º[ .-.___.-._| . . . .
>> .__( o)__( o).:_______
>>
>
>
> -- 
>
> Linux User #387870
> .........____
> .... _/_õ|__|
> ..º[ .-.___.-._| . . . .
> .__( o)__( o).:_______
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/94cdc672-f59b-4736-9733-b4d9708d07a8%40googlegroups.com.

Reply via email to