Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Creating user in TomCat using IExternalUserRegistryManager

Does anyboy have an example how to use this api calss to create users in Tomcat.

0 votes



One answer

Permanent link
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+"@my.com";
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();
contributor.setUserId(user_id);
contributor.setName(user_name);
contributor.setEmailAddress(email);
contributorManager.saveContributor(contributor, monitor);
System.out.println("Add user to Jazz.");

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,937

Question asked: Jun 28 '10, 8:39 a.m.

Question was seen: 5,417 times

Last updated: Jun 28 '10, 8:39 a.m.

Confirmation Cancel Confirm