Return to Jive Software

Skip navigation

This Question is Answered (go to answer)

2 "helpful" answers available (2 pts)
3,318 Views 14 Replies Last post: Oct 28, 2008 9:08 AM by todd.west RSS
thesamarin Novice 15 posts since
Oct 10, 2008
Currently Being Moderated

Oct 22, 2008 9:57 AM

Creating a UserProvider

I've read a few discussions here that lead me to believe that creating custom UserProviders is generally deprecated in favor of authentication filters. Unfortunately my solution must do the following:

 

  • Authenticate users based on passwords stored in remote systems
  • Ensure that the current email address can always be used as a username for the purposes of logging in
  • Pass along changes to the username (email address), password and other profile information to remote systems and vice-versa

 

Thus is seems like my best choice is to create a UserProvider so that special actions occur when a user updates his profile. Is a UserProvider the right path in this situation or can this be accomplished with an authentication filter?

 

I've already written a UserProvider which should work, but I'm stuck on figuring out what bean definition I should use to activate it. Any clues here as well? The documentation is tough to find for this.

todd.west Jive Employee 15,926 posts since
Jul 14, 2008
Currently Being Moderated
Oct 24, 2008 11:32 AM in response to: Martin Robinson
Re: Creating a UserProvider

Hi Martin,

 

From my understanding of Authentication Filters I don't believe its possible to send changes made to the username, email address, etc from Clearspace to an external location without at least custom User Provider.

 

Since it sounds like you have already written this where exactly are you stuck at and whats not functioning properly? Thanks!

 

-Todd

todd.west Jive Employee 15,926 posts since
Jul 14, 2008
Currently Being Moderated
Oct 24, 2008 11:36 AM in response to: Martin Robinson
Re: Creating a UserProvider

Hi Martin,

 

How did you create and implement this UserProvider? Did you use an overlay or did you modify the source directly? or something else?

 

-Todd

todd.west Jive Employee 15,926 posts since
Jul 14, 2008
Currently Being Moderated
Oct 24, 2008 2:22 PM in response to: Martin Robinson
Re: Creating a UserProvider

Hi Martin,

 

Here is my recommendation for you. I would recommend creating a plugin to imlement this userProvider in your installation. Basically what you will want to do is create a plugin which has your custom user provider in it and in the spring.xml file override the userManager with your custom user provider. I have attached a template plugin which I created to this post. Here is what you will want to do:

 

  1. Place your custom user provider in the src directory using your path structure
  2. Edit spring.xml and replace  your_userprovider and  com.your.UserProvider with your information
  3. Build your plugin and deploy to your Clearspace instance.

 

 

Please let me know if any of this was unclear or if you need any help. Thanks!

 

-Todd

Attachments:
todd.west Jive Employee 15,926 posts since
Jul 14, 2008
Currently Being Moderated
Oct 24, 2008 5:12 PM in response to: Martin Robinson
Re: Creating a UserProvider

Hi Martin,

 

Hmm that is very strange. You do have this in your code?

 

import com.jivesoftware.spi.user.UserProvider;

 

 

I would suggest looking at the custom auth filter because I believe they did something similar to what you did and it should be working:

 

https://svn.jivesoftware.com/svn/dev/repos/jive/plugins/custom-authentication/trunk/

 

 

Thanks.

 

-Todd

todd.west Jive Employee 15,926 posts since
Jul 14, 2008
Currently Being Moderated
Oct 24, 2008 5:28 PM in response to: Martin Robinson
Re: Creating a UserProvider

Hi Martin,

 

That is an odd error, does that get thrown every time you start clearspace? I don't think that the evaluation license should matter in this case. It looks like this should be working so I am really not sure why it can't find that class.

 

-Todd

todd.west Jive Employee 15,926 posts since
Jul 14, 2008
Currently Being Moderated
Oct 27, 2008 10:24 AM in response to: Martin Robinson
Re: Creating a UserProvider

Hi Martin,

 

Would it be possible to get a copy of the plugin that you are installing so I can do some testing locally and try to resolve this issue for you? Thanks.

 

-Todd

todd.west Jive Employee 15,926 posts since
Jul 14, 2008
Currently Being Moderated
Oct 28, 2008 9:08 AM in response to: Martin Robinson
Re: Creating a UserProvider

Great! Happy to hear that you were able to get this working. Thanks for the update Martin.

 

-Todd

More Like This

  • Retrieving data ...

Bookmarked By (0)