I'm working on a java spring security application and I want to implement sateless authentication with Json Web Token(JWT).
In case of ajax requests, there is not any problem and I can send generated token inside request header in this format:
Authorization: Bearer jwtHeader.jwtPayload.jwtSignature
The problem is sending GET
requests with clicking <a>
tags. Suppose I have a /my-orders
url that responsible for getting a normal html page and I want to secure it for just authenticated users. When a user click on a link or paste an api get url directly in browser address bar, his request always fails, because there is no jwt token in the get request.
Is there any way for sending jwt with browser get requests?