Message Boards

Public webservice in 7.2

Cedric Lecarpentier, modified 3 Years ago.

Public webservice in 7.2

New Member Posts: 9 Join Date: 6/9/14 Recent Posts

Hello the community,

I've developped some json webservices with Liferay 7.2, that are all working fine, relying on the p_auth mechanism, meaning that they are only allowed to authenticated users.

Today, I need to develop a public webservice, that would be accessible from my site's home page, with the user not being authenticated.

I've played with jsonws.web.service.paths.includes and jsonws.web.service.paths.excludes properties, but without success.

My public webservices has a name starting with the prefix 'public-'. All other webservices, that need to remain secured, start with other classic prefixes ('get', 'is', etc).

Does someone know a way to define that only the webservices starting with a given prefix (or regex) are public ?

Thank you a lot in advance,

Cedric

My tries that did not work:

Try1

jsonws.web.service.paths.includes=public*

Try2

jsonws.web.service.paths.includes=
jsonws.web.service.paths.excludes=get*,is*

Cedric Lecarpentier, modified 3 Years ago.

RE: Public webservice in 7.2

New Member Posts: 9 Join Date: 6/9/14 Recent Posts

Hello again,

I think I found the solution in the Liferay's Panel Control, by adding my public webservice in the SYSTEM_DEFAULT service access policy.

Cedric