Message Boards

How to authenticate jax-rs service to be access from liferay portlet only?

Mahmoud Mahmoud, modified 2 Years ago.

How to authenticate jax-rs service to be access from liferay portlet only?

New Member Posts: 2 Join Date: 10/7/21 Recent Posts

I have build React js portlete that call jax-rs Rest service in the same Liferay server 

Now I don't know how call this jax-rs with the best authentication.

I try to use oAuth2 but it redirect user to login page but the user already loged in.

Also I have this idea to get authToken inside react js and used it to call the api but I don't know how how to impelemt this in api. 

Is there Any solution?