[jboss-user] [JBoss Portal] - Re: How to get Ldap informations?

rammyramkumar do-not-reply at jboss.com
Mon May 26 07:47:09 EDT 2008


if u find my last posted code sample was vague then (to what i understand from your question)

with the below posted code you can easily understand the way to use the Identity modules and use the methods provided by them to get the information needed from LDAP

hope this helps

UserModule module = (UserModule) new InitialContext().lookup("java:/portal/UserModule");
								RoleModule roleModule =(RoleModule) new InitialContext().lookup("java:/portal/RoleModule");
								UserProfileModule userProfileModule  = (UserProfileModule) new InitialContext().lookup("java:/portal/UserProfileModule");	
								MembershipModule membershipModule = (MembershipModule) new InitialContext().lookup("java:/portal/MembershipModule");           

																																org.jboss.portal.identity.User userIdentity;		      
								userIdentity = (org.jboss.portal.identity.User) module.findUserByUserName(userName);	

								if 						org.jboss.portal.identity.User newCreateUser;
									newCreateUser = (org.jboss.portal.identity.User)module.createUser(userName, password);

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4153335#4153335

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4153335

More information about the jboss-user mailing list