Currently Being Moderated

LDAP VCard Avatar Plugin

VERSION 1

Created on: Nov 20, 2007 9:26 AM by Hannes Wüthrich - Last Modified:  Nov 20, 2007 10:11 AM by Hannes Wüthrich

This plugin allows users to store an avatar in their profile when Openfire is configured to use an LDAP directory as VCard provider.

 

Why would I need this plugin?

Openfire has the ability to use an LDAP server (in my case Active Directory) as a user and authentication backend. Users in the directory may then instantaneously login to the server without the need for an administrator to create them on the Openfire system. Additionally, the users details (names, address, phone numbers, etc.) are populated with data from the LDAP directory. This details are then provided to other users XMPP clients as VCards, which can be shown using the client.

 

It is important to note that users can not edit their profile when using LDAP VCards in Openfire. Unfortunately, the users avatars are also stored in the users VCards, which means users cannot upload an avatar to their profile if Openfire is configured to use LDAP VCards. This limitation is still an open issue. This is why I created this plugin. See this thread for additional information.

 

What does it do?

This plugin simply allows user to add an avatar to their profile while leaving all other user details intact. It does so by saving the VCard in the Openfire database (using the default Openfire VCard provider). On VCard retrieval the plugin adds the avatar from the VCard in the database to the users LDAP VCard.

 

Where do I get it?

You may download the latest version using the links below. The plugin is compatible with Openfire up to 3.2.2 (and probably future versions as well).

 

  • Binaries: #

  • Source: #

 

Version 1.0.4

In this version, you don't have to manually copy the plugin-ldapvcardavatar.jar into wildfires lib directory anymore. The classpath is extended at runtime to include the required jar automatically. Additionally, you don't have to change the vCard provider in wildfire.xml in order to use the custom provider. The provider is now automatically activated when the plugin is installed. On plugin removal, the original LdapVCardProvider is restored.

 

How do I install it?

Copy ldapvcardavatar.jar into the plugins directory of your Openfire installation. The plugin will then be deployed automatically.

 

Upgrades?

To upgrade to a new version, copy the new ldapvcardavatar.jar file over the existing file. Currently it might also be required to restart Openfire after the jar has been replaced. But this is just an assumption.

 

Users using v1.0.2 have to remove the plugin-ldapvcardavatar.jar from Openfires lib directory and restart Openfire before they replace the current plugins jar file.

 

FAQ

  1. When an avatar is set using the XMPP client a record in the Openfire database table jiveVCard is created and the avatar is shown in the profile. However, when the XMPP client is restarted, the avatar is not visible anymore? Make sure the vCard mapping (<vcard-mapping> element) in the Openfire configuration conf/openfire.xml does not contain a <PHOTO> element.

 

Attachments:
Average User Rating
(1 rating)




Andy Andy  says:

I've been trying this plugin with OpenFire 3.5.2 and Spark 2.5.8 and am unable to set my avatar

 

Whenever I attempt to update my profile in Spark (even without making ANY changes) I get:

 

  Server does not support VCards.  Unable to save your VCard.

 

Any help with this would be much appreciated.

 

MTIA

 

Andy

 

=====

FYI: The error log reads as:

 

java.lang.UnsupportedOperationException: LdapVCardProvider: VCard changes not allowed.

at org.jivesoftware.openfire.ldap.LdapVCardProvider.updateVCard(LdapVCardProvider. java:328)

at org.jivesoftware.openfire.vcard.VCardManager.setVCard(VCardManager.java:133)

at org.jivesoftware.openfire.handler.IQvCardHandler.handleIQ(IQvCardHandler.java:8 3)

at org.jivesoftware.openfire.handler.IQHandler.process(IQHandler.java:49)

at org.jivesoftware.openfire.IQRouter.handle(IQRouter.java:349)

at org.jivesoftware.openfire.IQRouter.route(IQRouter.java:101)

at org.jivesoftware.openfire.spi.PacketRouterImpl.route(PacketRouterImpl.java:68)

at org.jivesoftware.openfire.net.StanzaHandler.processIQ(StanzaHandler.java:311)

at org.jivesoftware.openfire.net.ClientStanzaHandler.processIQ(ClientStanzaHandler .java:79)

at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:276)

at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:175)

at org.jivesoftware.openfire.nio.ConnectionHandler.messageReceived(ConnectionHandl er.java:133)

at org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.messageReceived (AbstractIoFilterChain.java:570)

at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:299)

at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:53)

at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:648)

at org.apache.mina.common.IoFilterAdapter.messageReceived(IoFilterAdapter.java:80)

at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:299)

at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:53)

at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:648)

at org.apache.mina.filter.codec.support.SimpleProtocolDecoderOutput.flush(SimplePr otocolDecoderOutput.java:58)

at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecF ilter.java:185)

at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:299)

at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:53)

at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:648)

at org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java :239)

at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(Execut orFilter.java:283)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:51)

at java.lang.Thread.run(Unknown Source)

b b  says in response to Andy:

I have having the same issue.   What is weird though... my avatar loaded even though it says it failed.  But this was only visible on my machine.   The next day that was gone.

 

Some people have this working with no problems it seems.. of course that is not me!

 

 

Any insight would be great

More Like This

  • Retrieving data ...

More by Hannes Wüthrich