File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JForum and the fly likes Crowd Integration Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » JForum
Bookmark "Crowd Integration" Watch "Crowd Integration" New topic
Author

Crowd Integration

Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hi,

Has anybody managed to write an Application Connector for Crowd (http://www.atlassian.com/software/crowd/) and JForum?

Would be a nice way to use JForum with Confluence for example.
[originally posted on jforum.net by Jean-Baptiste Catt�]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
I'd like to do this as well. Would be an excellent feature.
[originally posted on jforum.net by apill]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
I've posted instructions here....

http://forums.atlassian.com/thread.jspa?messageID=257277790�

I'll re-post it here too in case it disappears from the link in the future.
[originally posted on jforum.net by apill]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
To setup JForum with authentication to crowd you should do the following.....


1. Compile the following class into a jar.






The following section of code from the above class is a nice additional feature that can be removed if required along with getAttribute(), registerAndActivateUser(), autoRegisterUser().



Basically, when you are using crowd instead of jforum for authentication you will create the users in crowd as your central authority and you probably do not want users registering themselves in Jforum manually. This code will check that a user has been authorized to login to JForum and then if they have not been registered with JForum they are automatically registered and activated. The auto registration also finds their email address from crowd which is included in the jforum registration.



For Maven 2 users...

The following pom.xml may be useful in compiling the class above if you use maven 2.



Note that the dependency for jforum does not exist in a maven repository, so I had to jar up the contents of jforum.war/WEB-INF/classes directory into a jar called jforum-2.1.8.jar and run the following maven command to install the jar into my local maven repository.




2. Copy the jar compiled in step 1 and all client libraries supplied with crowd standalone download (crowd-integration-client-x.x.x.jar and the contents of the lib directory all within atlassian-crowd-x.x.x/client directory) to jforum.war/WEB-INF/lib

See http://www.atlassian.com/software/crowd/CrowdDownloadCenter.jspa for crowd downloads.

You may have a version clash with log4j.jar in which case remove it from jforum.war/WEB-INF/lib.



3. Edit jforum.war/WEB-INF/config/SystemGlobals.properties and update the login.authenticator line to



4. Add a crowd.properties file to jforum.war/WEB-INF/classes configured for your crowd instance. An example is supplied with crowd (see atlassian-crowd-x.x.x/client/config) e.g.




These steps have configured the jforum side. Now create a new application in crowd with the name and password that matches the crowd.properties you installed in JForum. See crowd docs on configuring a new application in crowd.

I'll do my best to answer any questions if you have them....


[originally posted on jforum.net by apill]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Great work!
[originally posted on jforum.net by Jean-Baptiste Catt�]
 
Consider Paul's rocket mass heater.
 
subject: Crowd Integration