It's all about the answers!

Ask a question

Creating user in TomCat using IExternalUserRegistryManager

K M (38325051) | asked Jun 28 '10, 8:39 a.m.
Does anyboy have an example how to use this api calss to create users in Tomcat.

One answer

permanent link
Dong Young Kim (1931920) | answered Feb 28 '12, 12:12 a.m.
I used the following code snippet.

IContributorManager contributorManager = repo.contributorManager();
String groups[] = {"JazzUsers"};
String user_id = "test";

// create a user into "Tomcat" External User Registry
String user_name = "TEST";
String password = user_id;
String email = user_id+"";
userRegistryManager.addExternalUser(user_id, password, user_name, email, groups, monitor);
System.out.println("Add user to Tomcat.");

// create a user into Jazz DB
IContributor contributor = (IContributor) IContributor.ITEM_TYPE.createItem();
contributorManager.saveContributor(contributor, monitor);
System.out.println("Add user to Jazz.");

Your answer

Register or to post your answer.