You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Deepaks <de...@gmail.com> on 2008/02/04 22:24:40 UTC

Communicating auth info while calling services through runSync

I have been trying to access certain services through runSync and am unable
to get through.

I always get "You must be logged in to complete the [create a EntityName]
process." though I have turned auth=false just to test it out. But I think
it should have authentication turned on anyways. So is there any way I can
pass on user information into it?

Thanks in advance

PS: Basically, its part of moving an application to ZK interface. I have
built a form, then creating a context map and calling runSync.
-- 
View this message in context: http://www.nabble.com/Communicating-auth-info-while-calling-services-through-runSync-tp15277937p15277937.html
Sent from the OFBiz - User mailing list archive at Nabble.com.


Re: Communicating auth info while calling services through runSync

Posted by David E Jones <jo...@hotwaxmedia.com>.
If you are implementing your service using a simple-method it has  
security settings too (on the simple-method element itself). You'll  
need to tell it to not require auth there as well.

-David


On Feb 4, 2008, at 2:24 PM, Deepaks wrote:

>
> I have been trying to access certain services through runSync and am  
> unable
> to get through.
>
> I always get "You must be logged in to complete the [create a  
> EntityName]
> process." though I have turned auth=false just to test it out. But I  
> think
> it should have authentication turned on anyways. So is there any way  
> I can
> pass on user information into it?
>
> Thanks in advance
>
> PS: Basically, its part of moving an application to ZK interface. I  
> have
> built a form, then creating a context map and calling runSync.
> -- 
> View this message in context: http://www.nabble.com/Communicating-auth-info-while-calling-services-through-runSync-tp15277937p15277937.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>


Re: Communicating auth info while calling services through runSync

Posted by Deepak Sathya <de...@gmail.com>.
Thanks to both David and Rashko, I had missed the login-required
parameter in simple-method.

Now I can create an entity, so most of my code works :)

But now I have to try what Rashko suggested and see how it goes. As
creation of such things wont be good without authorized use.

Thanks again, will post back the results and maybe add few things to
the zk docs.


On Feb 5, 2008 3:06 AM, Rashko Rejmer <rr...@iguanait.com> wrote:
> Hi,
>
> Maybe you can pass the userLogin GV to the IN Map.
>
> E.g.:
> dispatcher.runSync("setPaymentStatus", UtilMisc.toMap("userLogin",
> userLogin, .............
>
> Regards,
> Rashko Rejmer
>
>
>
> On Mon, 2008-02-04 at 13:24 -0800, Deepaks wrote:
> > I have been trying to access certain services through runSync and am unable
> > to get through.
> >
> > I always get "You must be logged in to complete the [create a EntityName]
> > process." though I have turned auth=false just to test it out. But I think
> > it should have authentication turned on anyways. So is there any way I can
> > pass on user information into it?
> >
> > Thanks in advance
> >
> > PS: Basically, its part of moving an application to ZK interface. I have
> > built a form, then creating a context map and calling runSync.
>
>

Re: Communicating auth info while calling services through runSync

Posted by Rashko Rejmer <rr...@iguanait.com>.
Hi, 

Maybe you can pass the userLogin GV to the IN Map.

E.g.:
dispatcher.runSync("setPaymentStatus", UtilMisc.toMap("userLogin",
userLogin, .............

Regards,
Rashko Rejmer


On Mon, 2008-02-04 at 13:24 -0800, Deepaks wrote:
> I have been trying to access certain services through runSync and am unable
> to get through.
> 
> I always get "You must be logged in to complete the [create a EntityName]
> process." though I have turned auth=false just to test it out. But I think
> it should have authentication turned on anyways. So is there any way I can
> pass on user information into it?
> 
> Thanks in advance
> 
> PS: Basically, its part of moving an application to ZK interface. I have
> built a form, then creating a context map and calling runSync.