I'm writing a JIRA plugin which needs to present a list of Users to an Admin user. I'm using UserManager to check that the admin user has logged in but the UserManager appears to only have methods for a single user.
I have tried the REST API but using this from within the plugin requires credentials (e.g. BASIC AUTH) to be added to the request header and unless there are 'service' accounts, how can I retrieve the admin user's name and password to inject into the request header.
I'm using JIRA v 7.2.1 and can find no way to just get the list of users. Or do I need to call the database directly with a sql query?
Thanks.