Coder Social home page Coder Social logo

Comments (3)

dsyer avatar dsyer commented on May 24, 2024

That should be automatic if you are using @EnableOAuth2Sso (or the equivalent setup with OAuthCientAuthentciationFilter). If the token is invalid the client will throw a UserRedirectRequiredException.

from spring-cloud-security.

NickPadilla avatar NickPadilla commented on May 24, 2024

Hello @dsyer - Thanks again for your prompt response! From what I see, the DefaultTokenServices and RemoteTokenServices both throw a InvalidTokenException which gets caught by the OAuth2AuthenticationProcessingFilter and that calls the AuthenticationEntryPoint.commence. The exception that commence is given is a InsufficientAuthenticationException which extends AuthenticationException.

So what it looks like i need to do is to throw a UserRedirectRequiredException when i find a token is invalid.

Currently I just get the error page that shows the "Access token expired: {token}" message. No redirect ever takes place. Maybe b/c I am using @EnableOAuth2Sso and @EnableZuulProxy together?

from spring-cloud-security.

NickPadilla avatar NickPadilla commented on May 24, 2024

Ok so, I didn't change anything on my end to affect this - but it is now redirecting and not showing the error xml. I did clear my local maven repository because of another issue - so maybe I had a stale version.

from spring-cloud-security.

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.