Git Product home page Git Product logo

Comments (7)

jmdopereiro avatar jmdopereiro commented on June 11, 2024

I created the endpoint in a new local branch.

If the current token is expired it returns 401, if not it returns a new token.

I can create a PR for you to review, I think i would need your permission to push ? :-)

Thanks

Jose

from jwt-spring-security-demo.

szerhusenBC avatar szerhusenBC commented on June 11, 2024

@jmdopereiro Sorry for that late answer! Just create a pull request so that I can review and merge it.

from jwt-spring-security-demo.

jmdopereiro avatar jmdopereiro commented on June 11, 2024

Hi Stephan, I have created a local branch and committed the changes to it, but when I try to push it (not sure I can create the PR without pushing first my branch) I get a 403.

403Pushing

from jwt-spring-security-demo.

szerhusenBC avatar szerhusenBC commented on June 11, 2024

Ah, OK. The normal way is to fork this project, create a new branch on your forked project and then create a PR. Could you try that?

from jwt-spring-security-demo.

jmdopereiro avatar jmdopereiro commented on June 11, 2024

yeap ok, I did it, what do you think ?

from jwt-spring-security-demo.

szerhusenBC avatar szerhusenBC commented on June 11, 2024

I saw it, looks good so far. One thing, did you check, that I fails, if the token you want to refresh is too old? I can't test it myself right now. It shouldn't be possible to refresh a token, that is too old.

from jwt-spring-security-demo.

jmdopereiro avatar jmdopereiro commented on June 11, 2024

That's right (sorry I had some troubles with my browser cache). I just retested, decreased the token-validity-in-seconds to 120 and then waited 2 minutes, the new token api is protected as the rest by the JWTFilter so when the current token is expired it doesn't refresh the token but returns 401. Here you have a postman screenshot and the application logs.

TokenExpiredOnRefreshToken

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.