It's all about the answers!

Ask a question

Is it possible to authenticate across multiple repositories within a server plugin?

Stewart Wetter (111) | asked Mar 19 '15, 12:14 p.m.
We have a server side plugin already working that will create a related work item, and link it back to the original work item.

The problem we are having is expanding on this to have the related work item created on different repository with a related change request.  The two repositories are friended and are setup with Single Sign On so users can jump between the differnet repos without having to log in again.
    Is there a way to grab the current user context and use it to connect to the second repository?

2 answers

permanent link
sam detweiler (12.5k6195201) | answered Mar 19 '15, 2:07 p.m.
not that I am aware of. you can get the user the plugin is running under, but not their password.

you can use the AbstractService.getAuthenticatedContributor() method to determine the user context.
from there you can get userid and email.. but not password

permanent link
Lawrence Smith (3764) | answered Mar 19 '15, 2:41 p.m.
 You will need to use an OSLC request. Here is a quick starter guide with details:

Hope this helps... ask if you need more info.

Lawrence Smith [IBM]

sam detweiler commented Mar 19 '15, 2:50 p.m.

he still needs the user's credentials.

Your answer

Register or 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.