Within the Java code of a Bitbucket Server plugin, I would like to get the user who is currently logged in to Bitbucket.
In another post related to Jira, I found this line:
User user = ComponentAccessor.getJiraAuthenticationContext().getUser().getDirectoryUser();
However this is for Jira, also it was 2013. There is apparently no such thing as ComponentAccessor in the Bitbucket libraries. Is there any similar way to achieve this in Bitbucket?
We’ve been building a plugin to integrate Bitbucket Server and Jenkins CI, and I’m excited to announce that our alpha is ready to download and install. It lets you seamlessly configure a Jenkins job ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events