Closed alonisser closed 10 years ago
What version of angular-http-auth
are you using? The feature you are looking for seems to be included for 4 months already (pull req. #36).
I can see the function in the source code.. (also I don't recall the docs mention it) may work for me, will update
Thanks work fine! the docs should be more explicit about this. I'll try to get this into a docs PR later.
I bumped into a problem with angular-http-auth (a great lib I enjoyed using and reading the code..) which I managed to solve and was wandering if you would be interested in a PR along those lines:
The problem: We are doing auth with a securitycode/token in params or Authorization header (depending on post or get) , so when I get a 401 from the server, the saved http request includes the wrong param. while the relogin scenario does refresh the security code to an updated one, the buffered http request is retried and creates a 401 once again.
to work around this problem I patched http-auth to receive an object on confirmLogin, that includes the param name to be changed and the new security token, then in
retryAll
I patchbuffer[i].config.params.someparam
andbuffer[i].config.headers.anotherparam
with the new data (if they exists..)what do you think?