Giter VIP home page Giter VIP logo

Comments (6)

vimalloc avatar vimalloc commented on July 24, 2024

I was thinking about that myself, as it would also have the benefit of allowing you to properly mutex your keys and address #25, and generally giving you more control over the blacklist.

It would be a pretty big breaking change so I want to give it a bit more thought, but my initial thoughts are that it seems reasonable to me. I'll need to find time to work on it though, unless you want to submit a PR.

from flask-jwt-extended.

zerbusdetroy avatar zerbusdetroy commented on July 24, 2024

OK, I will think about that but I don't have much time available these days either. For my case I finally used a workaround creating a custom implementation of simplekv.
I have not yet tried to improve the performance of the function get_stored_tokens but if necessary I can use my workaround to duplicate the identity to an other field and do my own get_stored_tokens why nice performances.

However it is a very dirty solution, I may submit a PR so that we can do it properly if I find some time to do it.

from flask-jwt-extended.

vimalloc avatar vimalloc commented on July 24, 2024

No worries. If you do end up finding time time and want to hack at it I would happily accept a PR, but assuming you don't I'll try to find some time in the next few weeks to properly work through this and see if I can get something ready.

If you don't mind, I'll hit you up when I have the basics in place to make sure it would address your use case.

Cheers.

from flask-jwt-extended.

vimalloc avatar vimalloc commented on July 24, 2024

I started working on this in on the blacklist_v2 branch. It still has more work to go, but basically what I'm thinking is the user has to define a function that says if a token is revoked or not (if blacklist is enabled), that we check in the @jwt_required calls. The user is responsible for inserting tokens into their blacklist of choice, however they so choose.

I think this will give everyone enough flexibility to basically do whatever they want. Does this sound good to you?

from flask-jwt-extended.

zerbusdetroy avatar zerbusdetroy commented on July 24, 2024

Yes of course, with :)

from flask-jwt-extended.

vimalloc avatar vimalloc commented on July 24, 2024

Version 3.0.0 was just released, which provides support for this.

Check out these for details, and let me know if you run into any issues

from flask-jwt-extended.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.