Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retry zuul request with new Auth header for 401 status code #607

Closed
pdondapa opened this issue Aug 20, 2019 · 2 comments
Closed

Retry zuul request with new Auth header for 401 status code #607

pdondapa opened this issue Aug 20, 2019 · 2 comments
Labels

Comments

@pdondapa
Copy link

pdondapa commented Aug 20, 2019

I need to catch '401' Un-Authorized status code of the zuul requests and retry using a new Access token

I am using spring-cloud-starter-zuul for routing the requests, I am adding the Access token in PreRequestFilter from Spring Session.. I need to catch the '401' Un-Authorized status code for the expired tokens and retry the same request using a new access token created using the existing token..

Here is my zuul configuration
zuul.routes.service1-api.url=http://service1:8080/api/v1/ zuul.routes.service2-api.url=http://service2:8080/api/v1/ zuul.routes.service3-api.url=http://service3:8080/api/v1/ zuul.host.connect-timeout-millis=60000 zuul.host.socket-timeout-millis=60000 zuul.add-proxy-headers=false ribbon.eureka.enabled=false

In my PreRequestFilter

@Override public Object run() { this.setHeadersToContext(ctx); return null; }

Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Sep 30, 2024
Copy link

github-actions bot commented Oct 7, 2024

This issue was closed because it has been stalled for 7 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant