Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Sonny Corvette
Custom Service /api/jsonws doesn't work 6.1.1 CE GA2
August 29, 2012 8:51 AM
Answer

Sonny Corvette

Rank: New Member

Posts: 7

Join Date: August 17, 2012

Recent Posts

Hello,

I'm trying to build a custom service, to access it by mobile phones using json api.

I make my WAR using public maven archetypes for recent version 6.1.1 CE GA2, and just make my service.xml with my service.

- When I go to http://localhost:8080/my-portlet/api/jsonws, my public method called "register" in MyPortletServiceImpl, is showed in the left menu. If I try it, using the automatic form in order to test the method, I get this error in the result view. (I tested the same thing in the 6.1.0 CE and it works fine)
{
"exception": "Invalid authentication token"
}
This error appear even if I'm logged in as super admin in the same browser instance.

- In another hand, I made a simple HTML with 2 forms to test that from outside of portal to verify JSON API as follow:

<html>
<body>
<form name="testForm" action="http://user:pass@localhost:8080/my-portlet/api/secure/jsonws/myportlet/register" method="POST">
<p>Test custom service!</p>

<input type="hidden" name="p_auth" value="oC9AoWXf" />

<input type="hidden" name="variable1" value="value1" />
<input type="hidden" name="variable2" value="value2" />

<input type="submit" value="Custom Test!" />
</form>

<form name="testForm2" action="http://user:pass@localhost:8080/api/secure/jsonws/user/get-user-by-screen-name" method="POST">
<p>Test Liferay built-in service!</p>
<input type="hidden" name="p_auth" value="aJBcAt3N" />
<input type="hidden" name="companyId" value="10154" />
<input type="hidden" name="screenName" value="user" />
<input type="submit" value="Get User Test!" />
</form>

</body>
</html>

The second form works fine, even if I dont pass the user and pass, the service deny me the access, so, it's ok I think.

But the first form, give me the same error "Invalid authentication token". I put a breakpoint into Liferay source code in SessionAuthToken.java class and I saw this method
launch the error when p_auth_secret doesn't exist:

public void check(HttpServletRequest request) throws PrincipalException {
if (isIgnoreAction(request) || isIgnorePortlet(request)) {
return;
}

String requestAuthenticationToken = ParamUtil.getString(
request, "p_auth");

String sessionAuthenticationToken = getSessionAuthenticationToken(
request, _PORTAL);

String propertiesAuthenticatonTokenSharedSecret = Encryptor.digest(
PropsValues.AUTH_TOKEN_SHARED_SECRET);

String requestAuthenticatonTokenSharedSecret = ParamUtil.getString(
request, "p_auth_secret");

if (!requestAuthenticationToken.equals(sessionAuthenticationToken) &&
!requestAuthenticatonTokenSharedSecret.equals(
propertiesAuthenticatonTokenSharedSecret)) {

throw new PrincipalException("Invalid authentication token");
}
}

So, I put an extra hidden parameter in my first form as follow:
<input type="hidden" name="p_auth_secret" value="ZHDpROFlipNlP4vN2WsE3xfabPU=" />
The value is an encoded value of secret shared token. I get it using my debug.

- Now, If I execute the first form, another error appear:
{"exception":"Please sign in to invoke this method"}

This is because remoteUser is null in the JSONServiceAction.java class:

protected void checkMethodGuestAccess(
HttpServletRequest request, String methodName,
String[] publicMethods)
throws PrincipalException {

if ((methodName != null) && (publicMethods.length > 0)) {
if (Wildcard.matchOne(methodName, publicMethods) != -1) {
return;
}
}

String remoteUser = request.getRemoteUser();

if (remoteUser == null) {
throw new PrincipalException(
"Please sign in to invoke this method");
}
}

So, I dont know how can I fix it, I read all I found about JSON api in Internet.

Questions:
Why automatic Liferay Form doesn't work in this version 6.1.1 ?
Can somebody help me to understand how can I fix it?
Am I using this API correctly? Need I to pass the p_auth_secret param?? what about p_auth ? I just want to consume my service as authenticated user from mobile phones.

Thank you for your help!
Sonny
Sonny Corvette
RE: Custom Service /api/jsonws doesn't work 6.1.1 CE GA2
August 23, 2012 4:32 AM
Answer

Sonny Corvette

Rank: New Member

Posts: 7

Join Date: August 17, 2012

Recent Posts

Can somebody help me?

How can I consume my custom service as authenticated user from outside of portal via JSON API?
Why Liferay has generated a test form for my services, but it seems doesn't work?

The first and most important point is the error "Invalid authentication token" I think.

Thank you for your help!
Sonny
Vilmos Papp
RE: Custom Service /api/jsonws doesn't work 6.1.1 CE GA2
August 23, 2012 4:42 AM
Answer

Vilmos Papp

LIFERAY STAFF

Rank: Liferay Master

Posts: 521

Join Date: October 21, 2010

Recent Posts

Hi Sonny,

You could try setting this
1json.service.auth.token.enabled=false

in your portal-ext.properties.

Regards,
Vilmos
tri ngo
RE: Custom Service /api/jsonws doesn't work 6.1.1 CE GA2
August 23, 2012 9:52 AM
Answer

tri ngo

Rank: New Member

Posts: 1

Join Date: March 13, 2012

Recent Posts

Hello,

I'm also facing the same issue and I added the "json.service.auth.token.enabled=false" to my ext.properties but still facing the same issue.

Thanks,
Harish Kumar
RE: Custom Service /api/jsonws doesn't work 6.1.1 CE GA2
August 24, 2012 12:32 AM
Answer

Harish Kumar

Rank: Expert

Posts: 473

Join Date: July 31, 2010

Recent Posts

Hi Sonny

Why automatic Liferay Form doesn't work in this version 6.1.1 ?

I have developed the custom json web service and using Liferay 6.1EE on tomcat. The problem is mainly due to the generated url.

Suppose you have a custom service with method name getAllNames with no parameters, so generated url will of like this -

1
2http://localhost:8080/sample-portlet/api/jsonws?signature=/sample-portlet/sample/get-all-names-0#serviceResults and results in Exception "1"


to make this working, try to call using the following url -

1
2http://localhost:8080/sample-portlet/api/jsonws/sample/get-all-names



Regards,
Harish Kumar
RE: Custom Service /api/jsonws doesn't work 6.1.1 CE GA2
August 25, 2012 2:39 AM
Answer

Harish Kumar

Rank: Expert

Posts: 473

Join Date: July 31, 2010

Recent Posts

Sonny Corvette:
Can somebody help me?

How can I consume my custom service as authenticated user from outside of portal via JSON API?
Why Liferay has generated a test form for my services, but it seems doesn't work?

The first and most important point is the error "Invalid authentication token" I think.

Thank you for your help!
Sonny


Here is the link where I've posted sample code to consume custom service

http://liferayzone.wordpress.com/2012/08/25/consuming-liferay-json-web-services/


Regards,
Vilmos Papp
RE: Custom Service /api/jsonws doesn't work 6.1.1 CE GA2
August 27, 2012 12:39 AM
Answer

Vilmos Papp

LIFERAY STAFF

Rank: Liferay Master

Posts: 521

Join Date: October 21, 2010

Recent Posts

That error is already fixed in 6.1.1 CE GA2, so that's not the problem in this case.
Sonny Corvette
RE: Custom Service /api/jsonws doesn't work 6.1.1 CE GA2
August 27, 2012 12:42 PM
Answer

Sonny Corvette

Rank: New Member

Posts: 7

Join Date: August 17, 2012

Recent Posts

Hi Vilmos,

I have tested json.service.auth.token.enabled=false in my portal-ext.properties, and now, the second error appear again even if I'm logged in the same browser instance (using the form generated by Liferay for my service):
{
"exception": "Please sign in to invoke this method"
}

It's the same case as if I pass p_auth and p_auth_secret params in a custom HTML form as I explain in previous msg.

It must be a BUG of 6.1.1 CE GA2 I think, but I don't know how to fix it.

Any idea?
Vilmos Papp
RE: Custom Service /api/jsonws doesn't work 6.1.1 CE GA2
August 28, 2012 2:25 AM
Answer

Vilmos Papp

LIFERAY STAFF

Rank: Liferay Master

Posts: 521

Join Date: October 21, 2010

Recent Posts

If you think it's a bug, please create an LPS ticket in our public bug tracker: http://issues.liferay.com/

To help us, please upload a sample portlet by which you could reproduce this issue.

Thanks,
Vilmos
Sonny Corvette
RE: Custom Service /api/jsonws doesn't work 6.1.1 CE GA2
August 28, 2012 3:57 AM
Answer

Sonny Corvette

Rank: New Member

Posts: 7

Join Date: August 17, 2012

Recent Posts

Sonny Corvette:
Harish Kumar:
Sonny Corvette:
Can somebody help me?

How can I consume my custom service as authenticated user from outside of portal via JSON API?
Why Liferay has generated a test form for my services, but it seems doesn't work?

The first and most important point is the error "Invalid authentication token" I think.

Thank you for your help!
Sonny


Here is the link where I've posted sample code to consume custom service

http://liferayzone.wordpress.com/2012/08/25/consuming-liferay-json-web-services/


Regards,


Hi Harish,
I'll test your example, but I think the error will be the same...

Thank you for your answer.


Hi Harish,

I made a class with your example, and the result is the same:

2012-08-28 12:47:46,219 ERROR [JSONWebServiceServiceAction:114] com.liferay.portal.security.auth.PrincipalException: Please sign in to invoke this method
com.liferay.portal.security.auth.PrincipalException: Please sign in to invoke this method
at com.liferay.portal.action.JSONServiceAction.checkMethodGuestAccess(JSONServiceAction.java:164)
at com.liferay.portal.jsonwebservice.JSONWebServiceServiceAction.getJSON(JSONWebServiceServiceAction.java:100)
at com.liferay.portal.struts.JSONAction.execute(JSONAction.java:75)
at com.liferay.portal.servlet.JSONServlet.service(JSONServlet.java:75)
at com.liferay.portal.jsonwebservice.JSONWebServiceServlet.service(JSONWebServiceServlet.java:79)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at com.liferay.portal.kernel.servlet.PortalClassLoaderServlet.service(PortalClassLoaderServlet.java:99)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:67)
at $Proxy430.doFilter(Unknown Source)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:167)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:95)
at com.liferay.portal.kernel.servlet.PortalClassLoaderFilter.doFilter(PortalClassLoaderFilter.java:70)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:73)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)

Does somebody tested the JSON API authenticated access in 6.1.1 CE GA2 ? It seems as remoteUser always is null...
Hitoshi Ozawa
RE: Custom Service /api/jsonws doesn't work 6.1.1 CE GA2
August 28, 2012 5:04 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7949

Join Date: March 23, 2010

Recent Posts

Have you tried testing the service interface using liferay generated sample page?
Harish Kumar
RE: Custom Service /api/jsonws doesn't work 6.1.1 CE GA2
August 28, 2012 5:11 AM
Answer

Harish Kumar

Rank: Expert

Posts: 473

Join Date: July 31, 2010

Recent Posts

Looks like its a bug in 6.1.1 CE GA2, as same code is working fine on 6.1.1 EE GA1.
Hitoshi Ozawa
RE: Custom Service /api/jsonws doesn't work 6.1.1 CE GA2
August 28, 2012 5:17 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7949

Join Date: March 23, 2010

Recent Posts

That's not saying too much because there was a security bug in GA1 that was fixed.

http://issues.liferay.com/browse/LPS-26935
Sonny Corvette
RE: Custom Service /api/jsonws doesn't work 6.1.1 CE GA2
August 28, 2012 5:24 AM
Answer

Sonny Corvette

Rank: New Member

Posts: 7

Join Date: August 17, 2012

Recent Posts

Hitoshi Ozawa:
Have you tried testing the service interface using liferay generated sample page?


Exactly! I have tried testing the service interface using liferay generated sample page for my service. The rare thing is if you try another Liferay built-in service (as I mentioned before), it works. But if you try an external plugin service it's doesn't work.

When I debugged the Liferay Code, I saw remoteUser is null in JSONServiceAction.java for this case.

if (remoteUser == null) {
throw new PrincipalException(
"Please sign in to invoke this method");
}
Sonny Corvette
RE: Custom Service /api/jsonws doesn't work 6.1.1 CE GA2
August 28, 2012 10:39 AM
Answer

Sonny Corvette

Rank: New Member

Posts: 7

Join Date: August 17, 2012

Recent Posts

Harish Kumar:
Looks like its a bug in 6.1.1 CE GA2, as same code is working fine on 6.1.1 EE GA1.


I'm using 6.1.1 CE GA2, because in 6.1.1 CE GA1 the problem was just the opposite thing, I mean, there was a bug in 6.1.1 CE GA1 that you were be able to consume the service always!, without login! and now, I cant consume my service even as superadmin! emoticon
Daya Bethmage
RE: Custom Service /api/jsonws doesn't work 6.1.1 CE GA2
September 4, 2012 5:41 AM
Answer

Daya Bethmage

Rank: New Member

Posts: 2

Join Date: February 5, 2010

Recent Posts

we need to execute Liferay Portal in a different web context, for example in http://localhost:8080/portal/
when we try to use the JSON web service at http://localhost:8080/api/jsonws
we get http-404 not found.

Using
http://localhost:8080/portal/c/portal/api/jsonws
it Works.

can somebody please tell me, JSONS Webservices works with in a non ROOT context ?
Vilmos Papp
RE: Custom Service /api/jsonws doesn't work 6.1.1 CE GA2
September 10, 2012 2:22 PM
Answer

Vilmos Papp

LIFERAY STAFF

Rank: Liferay Master

Posts: 521

Join Date: October 21, 2010

Recent Posts

Hi Daya,

Wellcome on the forum!

Could you be more specific a bit?
What version do you use?
Do you set portal.ctx only?

If it's an urgent issue you could try to access it through e.g.: Apache with URL rewrite setup.

Regards,
Vilmos
Mauro Mariuzzo
Custom Service /api/jsonws doesn't work 6.1.1 CE GA2
September 12, 2012 6:33 AM
Answer

Mauro Mariuzzo

Rank: Regular Member

Posts: 141

Join Date: July 23, 2007

Recent Posts

I can confirm you that JSON WebServices doesn't works using a different context for the portal.

I've found the wrong code and provided a way to fix in http://issues.liferay.com/browse/LPS-29845
Vilmos Papp
RE: Custom Service /api/jsonws doesn't work 6.1.1 CE GA2
September 13, 2012 5:23 AM
Answer

Vilmos Papp

LIFERAY STAFF

Rank: Liferay Master

Posts: 521

Join Date: October 21, 2010

Recent Posts

Thanks Mauro!
Daya Bethmage
RE: Custom Service /api/jsonws doesn't work 6.1.1 CE GA2
September 24, 2012 1:44 AM
Answer

Daya Bethmage

Rank: New Member

Posts: 2

Join Date: February 5, 2010

Recent Posts

Hi Vilmos, Mauro

Thank you all for finding this issue for the patch. (i was out for few Days..)

anyway my configuration was the same as Mauro's comment on LPS-29845 :

"portal.ctx=/portal " inside of my portal-ext.properties
"Tomcat conf/Catalina/localhost/ROOT.xml renamedto portal.xml

I got in to this issue with :
Liferay 6.1.1CE and deployed Social Office package : 15190404_15190405_15190427.lpkg
many things were not working properly in case of URLs such as ../portal/portal/..
Regards.
Daya
Vilmos Papp
RE: Custom Service /api/jsonws doesn't work 6.1.1 CE GA2
October 2, 2012 2:40 AM
Answer

Vilmos Papp

LIFERAY STAFF

Rank: Liferay Master

Posts: 521

Join Date: October 21, 2010

Recent Posts

Hi Daya,

As I see the LPS-29845 is commited. So you can grab the diff from Github and merge it into your portal. That should do the trick.

Have you tried it?

Regards,
Vilmos
Giacinto Claudio De Caro
RE: Custom Service /api/jsonws doesn't work 6.1.1 CE GA2
October 10, 2012 6:46 AM
Answer

Giacinto Claudio De Caro

Rank: Junior Member

Posts: 44

Join Date: September 19, 2007

Recent Posts

Sonny Corvette:
Hi Vilmos,

I have tested json.service.auth.token.enabled=false in my portal-ext.properties, and now, the second error appear again even if I'm logged in the same browser instance (using the form generated by Liferay for my service):
{
"exception": "Please sign in to invoke this method"
}

It's the same case as if I pass p_auth and p_auth_secret params in a custom HTML form as I explain in previous msg.

It must be a BUG of 6.1.1 CE GA2 I think, but I don't know how to fix it.

Any idea?



Hi Sonny,
I have the same problem... you have solved the problem?

Thanx
Giacinto Claudio De Caro
RE: Custom Service /api/jsonws doesn't work 6.1.1 CE GA2
October 11, 2012 6:19 AM
Answer

Giacinto Claudio De Caro

Rank: Junior Member

Posts: 44

Join Date: September 19, 2007

Recent Posts

Solved.

portal-ext.properties:

1json.service.auth.token.enabled=false


And:

http://issues.liferay.com/browse/LPS-27014?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#issue-tabs
Aritz Galdos
RE: Custom Service /api/jsonws doesn't work 6.1.1 CE GA2
November 13, 2012 2:40 PM
Answer

Aritz Galdos

Rank: Expert

Posts: 405

Join Date: May 15, 2007

Recent Posts

Hi Guys,

I've been working with Liferay 6.1.0 and consuming jsonws with no problems. Now I upgraded to 6.1.1 and set
1json.service.auth.token.enabled=false


in portal-ext.properties

Well, if I access

http://192.168.0.14:9080/myportlet-portlet/api/jsonws

It shows the methods published by my portlet but when I invoke them I get

"exception": "Please sign in to invoke this method"

Even if I login in the portal and come back to this form the same error arises. It looks like I am not loged in "myportlet-porltet" context

But if I change the URL

From
/myporltet-portlet/api/secure/jsonws/thing/get-things
to
/api/jsonws/myporltet-portlet.thing/get-things
it works

It looks like now it executes within the portal context instead, and so, we are logged in

http://issues.liferay.com/browse/LPS-27014?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel#issue-tabs

But, now the so friendly forms in "/myportlet-portlet/api/jsonws" seem to be a little bit useless.

By the way, could someone spot some light on the way to go with auth token enabled mode?

Hope this helps!

Regards!!!
Gopinath Guptha
RE: Custom Service /api/jsonws doesn't work 6.1.1 CE GA2
November 15, 2012 7:27 AM
Answer

Gopinath Guptha

Rank: Junior Member

Posts: 25

Join Date: August 10, 2010

Recent Posts

I was able to solve this by adding the below lines in my web.xml -

<filter>
<filter-name>Secure JSON Web Service Servlet Filter</filter-name>
<filter-class>com.liferay.portal.kernel.servlet.PortalClassLoaderFilter</filter-class>
<init-param>
<param-name>filter-class</param-name>
<param-value>com.liferay.portal.servlet.filters.secure.SecureFilter</param-value>
</init-param>
<init-param>
<param-name>basic_auth</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>portal_property_prefix</param-name>
<param-value>jsonws.servlet.</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>Secure JSON Web Service Servlet Filter</filter-name>
<url-pattern>/api/jsonws/*</url-pattern>
</filter-mapping>

<servlet>
<servlet-name>JSON Web Service Servlet</servlet-name>
<servlet-class>com.liferay.portal.kernel.servlet.PortalClassLoaderServlet</servlet-class>
<init-param>
<param-name>servlet-class</param-name>
<param-value>com.liferay.portal.jsonwebservice.JSONWebServiceServlet</param-value>
</init-param>
<load-on-startup>0</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>JSON Web Service Servlet</servlet-name>
<url-pattern>/api/jsonws/*</url-pattern>
</servlet-mapping>

You might also need to add this in your portal-ext.properties -
jsonws.web.service.public.methods=*

For more information, you could refer this link -
http://www.liferay.com/es/documentation/liferay-portal/6.1/development/-/ai/json-web-services
Gwowen Fu
RE: Custom Service /api/jsonws doesn't work 6.1.1 CE GA2
February 28, 2013 2:36 PM
Answer

Gwowen Fu

Rank: Expert

Posts: 315

Join Date: December 27, 2010

Recent Posts

Hi Gopinath,

Does it work when "json.service.auth.token.enabled=true"? It doesn't work for me. (CE 6.1.1 CE GA2)

It only works when json.service.auth.token.enabled=false.

Thanks!
Gwowen
Meera Prince
RE: Custom Service /api/jsonws doesn't work 6.1.1 CE GA2
July 1, 2013 11:55 PM
Answer

Meera Prince

Rank: Liferay Legend

Posts: 1110

Join Date: February 8, 2011

Recent Posts

Hi try this following properties in portal-ext.properties..

#json.service.auth.token.enabled=false
#json.service.auth.token.hosts.allowed=127.0.0.1
#json.service.public.methods=get*,has*,is*
#json.service.public.methods=*