Verifying the token
We need to ensure that each request to our protected resource has a valid token present in the Authorization request header. There are other ways of passing the token, but it's fairly standard to use the Authorization request header. Since our backend is represented by multiple microservice applications, we don't want to duplicate the verification logic in each of them. A possible choice is to make use of an API Gateway, which acts as a filter or facade for the backend services. The API Gateway would intercept every request and validate the JWT before passing the request further to the target microservice. For the Issue Management System, a simpler strategy would be to use a request filter in the form of JAXRS ContainerRequestFilter ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access