Giter Club home page Giter Club logo

Comments (2)

szerhusenBC avatar szerhusenBC commented on May 21, 2024

Hi! Yes, of course you can implement the PersonRestService with MyBatis. Please search the web how to do that in Spring in detail. You rather can implement this service in any way (or with any data source) you want. You just have to look how to integrate it in Spring.

To the second part of your question:
I'm not sure what you mean. The token has actually a field (or claim) "created". You could check if that date is too old (expired) and reject the authentication in JwtAuthenticationTokenFilter#doFilterInternal. There is a rest point under AuthenticationRestController#refreshAndGetAuthenticationToken where you could refresh an existing token. In JwtTokenUtil#refreshToken you can see that in that case a new token is generated with an updated "created" field.

I would try to avoid a blacklist table in the database with expired token hashes because this table can grow very large. But feel free to do that if you want to blacklist tokens ;)

I hope this comment answers your questions. Please give me a feedback so I can close this ticket.

from jwt-spring-security-demo.

 avatar commented on May 21, 2024

Yes i want to want to blacklist tokens. but as you advoise,i should does't use it ,and use The token has actually a field (or claim) "created" instead. Thank you very much!

from jwt-spring-security-demo.

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.