Fórum

JAX-RS and Authentication

B P, modificado 6 Anos atrás.

JAX-RS and Authentication

New Member Postagens: 2 Data de Entrada: 20/11/17 Postagens Recentes
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, modificado 6 Anos atrás.

RE: Please see this...

Junior Member Postagens: 76 Data de Entrada: 02/02/11 Postagens Recentes
You can use Service Guard:

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

Thanks,
Ankit
B P, modificado 6 Anos atrás.

RE: Please see this...

New Member Postagens: 2 Data de Entrada: 20/11/17 Postagens Recentes
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?