Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: Very Simple JSON REST service in Liferay CE 7.1.2 GA3
Hello everybody,
I would like to implement a really simple REST service which can be reached without authentication.
Yes he should be public :-).
The "rest" template from the Liferay IDE creates a JAX-RS which would be the right approach and my favorite, unfortunately I can not reach the service without authentication.
Does anyone have an idea how I can deactivate the authentication for a certain context or it exists even an alternative to the JAX-RS?
Many Greetings,
Dennis
I would like to implement a really simple REST service which can be reached without authentication.
Yes he should be public :-).
The "rest" template from the Liferay IDE creates a JAX-RS which would be the right approach and my favorite, unfortunately I can not reach the service without authentication.
Does anyone have an idea how I can deactivate the authentication for a certain context or it exists even an alternative to the JAX-RS?
Many Greetings,
Dennis
You have two options:
-) Create a 7.0 rest service. It still works in 7.1
-) Add the necessary properties for anonymous access:
https://community.liferay.com/de/forums/-/message_boards/message/112794830
-) Create a 7.0 rest service. It still works in 7.1
-) Add the necessary properties for anonymous access:
@Component(
property = {
JaxrsWhiteboardConstants.JAX_RS_APPLICATION_BASE + "=/greetings",
JaxrsWhiteboardConstants.JAX_RS_NAME + "=Greetings.Rest",
"oauth2.scopechecker.type=none",
"auth.verifier.guest.allowed=true",
},
service = Application.class
)
https://community.liferay.com/de/forums/-/message_boards/message/112794830
Thanks you! It's working fine.