I have Angular + Spring app and I trying to authenticate services with JWT tokens.
In Jwt authentication I am storing token in localStorage and attaching token in the Authorization HTTP header of a every request. This can be done by writing interceptor in AngularJs. I have followed this tutorial.
Now my question is:
How can I authenticate Requests made directly through hitting URL in browser ?
When you hit the Url at that time no page loaded and no script to bind URL from localStorage to Authentication header. so ultimately server will reject the request and send 401 even if the user is authenticated before.