Gursimrat
10 years agoLeader
Making secure connection b/w Custom component and Endpoint using AJAX
Hi All,
We are calling an endpoint from a custom component using Ajax. It works fine but we have one query - Is there a way we can authenticate the call at the endpoint that it was made from the custom component only? As the Endpoints can be accessed via browser as well, and by passing parameters, anyone can see the data. Is there a way we can fill this gap?
e.g.
The profile hover endpoint on lithosphere can be hit directly from browser and you just need to change the user id and you will get the respective results.
This is a simple case, but still, is there a way to authenticate the call inside the Endpoint to verify that the source was the custom component and not the direct browser hit?