Support #7114
closedRPrototypingLab – Dataminer web-service doesn't work with application token
100%
Description
I've set-up an application token for identifier named "GRSF" in the RPrototypingLab. I've then tried to use this token to run Dataminer web-service, it doesn't work, while it works well with my private user token.
Can you help? Thanks
Updated by Lucio Lelii over 8 years ago
- Assignee set to Gianpaolo Coro
The problem is that now the tokens type are different, dataminer is assuming that the caller is always a USER and the error is the following:
java.lang.ClassCastException: org.gcube.common.authorization.library.provider.ExternalServiceInfo cannot be cast to org.gcube.common.authorization.library.provider.UserInfo
at org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mapping.TokenManager.getCredentials(TokenManager.java:35)
at org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mapping.AbstractEcologicalEngineMapper.manageUserToken(AbstractEcologicalEngineMapper.java:259)
at org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mapping.AbstractEcologicalEngineMapper.run(AbstractEcologicalEngineMapper.java:377)
at org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.GEOGRSF_INTERSECTS.run(GEOGRSF_INTERSECTS.java:22)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.n52.wps.algorithm.annotation.AnnotationBinding$ExecuteMethodBinding.execute(AnnotationBinding.java:89)
at org.n52.wps.server.AbstractAnnotatedAlgorithm.run(AbstractAnnotatedAlgorithm.java:54)
at org.gcube.dataanalysis.wps.statisticalmanager.synchserver.web.ExecuteRequest.call(ExecuteRequest.java:607)
at org.gcube.dataanalysis.wps.statisticalmanager.synchserver.web.ExecuteRequest.call(ExecuteRequest.java:67)
at org.gcube.common.authorization.library.AuthorizedTasks$1.call(AuthorizedTasks.java:31)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
in this case the clientInfo is of type ExternalServiceInfo instead of UserInfo. You can manage this different types or, in case you need only the identifier of the caller, use the getId() method from the super class.
Updated by Gianpaolo Coro over 8 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
This feature was introduced in the months I was out-of-office. It will be included in the next release. For the moment, please use the user tokens.