Closed mbrio closed 11 years ago
Hi, I am sorry, but I must close this without merging. I like your approach which adds infinite flexibility to the handler, but the problem is it now becomes too complicated. OK, this is subjective, let me explain.
The thing is, the original solution was much simpler, and I was not once asked about how it works and how should it be used, etc... It was already hard for many to follow. Now it becomes an order of magnitude more complex (the price of flexibility).
The question is: do we need such a flexibility if all the original solution was missing was a kind of a "flag" to be attached to some specific requests, so they would go through the interceptor without being noticed?
Another question is: wouldn't it be easier, for some specific case, to write a dedicated (case-specific) HTTP interceptor instead?
The previous pull that was accepted into angular-http-auth was flawed in three ways:
You can see an example of this in practice: https://github.com/qloo/angular-authentication, be sure to bower install to get the dependencies in and view the example/index.html file.