question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hi, I found an issue with jwt_required decorator, I don’t understand why works when I used like:

@custom_api.route('/resellers/<token>/registrations', methods=['GET'])
@jwt_required
def get_resellers(token):
  ...

but NOT when:

I’m using https://flask-restless.readthedocs.io/en/stable/ where I can use methods as preprocessor

    @classmethod
    @jwt_required
    def get_many_preprocessor(cls, search_params=None, **kw):
        print "Here not work"

This worked me with flask-jwt, what could be?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:15 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
vimalloccommented, Oct 17, 2016

Awesome! Very glad to hear it 😃

I’ll leave this issue open until I get these fixes pushed to pypi/pip.

Cheers.

1reaction
vimalloccommented, Oct 16, 2016

Assuming you are using a virtualenv, you can run:

pip install -U git+https://github.com/vimalloc/flask-jwt-extended.git
Read more comments on GitHub >

github_iconTop Results From Across the Web

Custom Decorators — flask-jwt-extended 4.4.4 documentation
You can create your own decorators that extend the functionality of the decorators provided by this extension. For example, you may want to...
Read more >
Part 4: JWT Authentication, Decorators and Blacklisting Tokens
route decorator binds this resource to the /api/v1/auth/login URL route. Line 37: The HTTP status codes for successfully registering a new user and...
Read more >
Using authentication decorators in Flask - CircleCI
In this tutorial, we have learned how to create custom authentication decorators and use them in our API to receive and decode JWT...
Read more >
Decorators — Django GraphQL JWT 0.3.4 documentation
Decorator to check whether a user has a particular permission. ... The decorator may also take an iterable of permissions, in which case...
Read more >
Auth JWT in decorator in NESTJS - Stack Overflow
You can create a custom decorator in that case. //user.decorator.ts import { createParamDecorator, ExecutionContext } from '@nestjs/common'; ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found