i'm developing a web application(servlets,jsp) with Rest services using jax rs. In the web application UI i'm calling these webservices through jaxrs client with the help of servlets(servlets calls jax-rs client, client inturn calls webservices).parallely i'm exposing these webservices.
Now i'm trying to add authentication, authorization such that when calls made to these webservices through web UI(HTML, Servlets, jax-rs client) there should not be any checking . but when calls made to the webservices directly through browser url or some plugins like advanced rest api, postman it should show authentication error. How can i achieve this
Inshort - how to differentiate the direct webservices calls and UI calls made to these webservices.
Thanks in advance