Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Angular interceptor possible dup #1096

Closed
pgrodrigues opened this issue Dec 10, 2015 · 1 comment
Closed

Angular interceptor possible dup #1096

pgrodrigues opened this issue Dec 10, 2015 · 1 comment

Comments

@pgrodrigues
Copy link
Contributor

Hey, is there any particular reason to have two similar interceptors in core/services and in users/config.

IIRC the first one is the most recent and maybe people forgot to delete the latter or merge in the same file possible changes (only one I can think of is Authentication.user = null; which is missing in the first one).

@mleanos
Copy link
Member

mleanos commented Dec 11, 2015

I think you're absolutely right. We don't need both, and the older one was probably overlooked when the authInterceptor service was implemented. I don't see anything that would prevent us from removing the $http provider config from the User's module; the authInterceptor service is a much better implementation.

We do need to add Authentication.user = null; to the service before this line, authInterceptor service 401, and we should be good. This will clear the user out of the browser, so that the lack of authentication is properly represented.

Related, but not a factor for this issue: We need to address the issue of a 403 status in the interceptor, caused by a request from an unauthenticated user. I think the ACL's will need to be updated to return 401 in these cases.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants