Return to Jive Software

This Question is Answered (go to answer)

2 "helpful" answers available (2 pts)
754 Views 5 Replies Last post: Aug 18, 2009 1:47 PM by rigo RSS
rigo Novice 25 posts since
Jul 22, 2009
Currently Being Moderated

Aug 18, 2009 9:10 AM

Authentication & Web Services

Hello,

 

I was wondering if it is possible for me to get the user authentication within a widget or plugin and parse that to a web service that we own. How would be the best way to accomplish this? Do you guys have any examples on that?

 

I thought of maybe using a cookie but is that the best approach?

 

Thanks,

 

rigo

Tags: authentication, services, web
Rick Palmer Jive Employee 227 posts since
Nov 14, 2007
Currently Being Moderated
Aug 18, 2009 10:04 AM in response to: rigo
Re: Authentication & Web Services

Yes, you have full access to the current user from the WidgetContext variable that is passed in to your widget's render() method by the system.

Vinh Jive Employee 12,343 posts since
Apr 1, 2008
Currently Being Moderated
Aug 18, 2009 10:33 AM in response to: rigo
Re: Authentication & Web Services
If you have a copy of the source code, you can take a look at the class. You're looking for the getUser() method within the widget context, which returns a User object containing the current user viewing the page.
Rick Palmer Jive Employee 227 posts since
Nov 14, 2007
Currently Being Moderated
Aug 18, 2009 10:39 AM in response to: rigo
Re: Authentication & Web Services
The best documentation we have on widgets would be the Building Widgets guide in the Developer community, and we also cover this in more detail in the SBS 3.0 Developer Training Course that we offer online and onsite.

More Like This

  • Retrieving data ...

Bookmarked By (0)

To better serve our customers we have included functionality to automatically follow up on a case after it has been idle for more than 5 days, and then auto close after an additional 3 days of inactivity. Choose No to acknowledge that this case will remain idle for longer than 5 days.
Making cases public allows other customers to learn from the solution of the case. It can also be used to gain feedback from others in the community. Ask our Support Engineers for more info, but we encourage you to make your cases public.