keycloak-angular icon indicating copy to clipboard operation
keycloak-angular copied to clipboard

Ignore list for polling endpoints

Open kevinahuber opened this issue 4 years ago • 5 comments

Bug Report or Feature Request (mark with an x)

- [ ] bug report -> please search for issues before submitting
- [x] feature request

Versions.

{
    "@angular/common": "9.1.12",
    "keycloak-angular": "7.3",
    "keycloak-js": "3.4.3",
}

Desired functionality.

I would like the ability to add an ignore list of routes for the refresh token to activate.

The use case is that I have a few authenticated polling endpoints that run every 30 seconds. I'd like those to require authentication but not refresh the token, because they will keep the token alive forever.

I don't see a clear way to delineate this using auth guards or anything documented, and I'm open to creative solutions beyond an ignore list!

kevinahuber avatar Jul 07 '21 16:07 kevinahuber

As an alternative, I think that having an ignore list based on request headers would be an improvement over route matching. That should allow it to match routes as you'd expect but also be a bit more explicit about how it matches.

I am going to start working on a PR for this feature.

jeddai avatar Oct 18 '21 14:10 jeddai

@jeddai This definitely works and is an improvment! Thanks. Eager to see it reviewed and merged.

kevinahuber avatar Oct 25 '21 14:10 kevinahuber

Hi there, is there anything we need to do to get this reviewed merged?? It's a helpful addition to the integration and would appreciate feedback.

brainstain avatar Nov 16 '21 21:11 brainstain

I liked the idea. I will review it today. Thanks @jeddai and all involved.

mauriciovigolo avatar Nov 17 '21 07:11 mauriciovigolo

is there an update on this?

electrofLy avatar Apr 06 '22 08:04 electrofLy