Forums de discussion

JAX-RS and Authentication

B P, modifié il y a 6 années.

JAX-RS and Authentication

New Member Publications: 2 Date d'inscription: 20/11/17 Publications récentes
Here is an example of JAX-RS services inLiferay:
http://www.liferaystack.com/2017/11/rest-extender-and-jax-rs-restful-web-service-in-liferay-7-dxp.html

Can you please explain to me how to make these web services require authentication? Pardon me, but I'm brand new to Liferay and JAX-RS, so maybe it's obvious, but I'm still learning. It seems anyone can call these web services (i.e. a guest). How do I change it so that basic authentication is needed to call these services?

Thanks!
thumbnail
ANKIT SRIVASTAVA, modifié il y a 6 années.

RE: Please see this...

Junior Member Publications: 76 Date d'inscription: 02/02/11 Publications récentes
You can use Service Guard:

https://xtivia.github.io/sgdxp/#overview

Thanks,
Ankit
B P, modifié il y a 6 années.

RE: Please see this...

New Member Publications: 2 Date d'inscription: 20/11/17 Publications récentes
Thanks! I'm still confused about the implementation.

I want the native mobile app to present the user with a login screen then I want to authenticate that user against an LDAP server. After the user has been authenticated then all subsequent REST service calls from the mobile app will be authenticated. Typically, this seems to be done through OAuth2, correct? I don't want to use OAuth2. Can I use basic authentication or cookie based authentication? How would that work with the Service Gaurd library?