Find Questions…

Close ×
First time here? Check out the FAQ!

How to perform API user logout to free user session?

TimY asked this question · 96 karma ·

Dear all,

I have a v1 plugin that updates issue; in order to do that, the API (getIssueService().update) requires the user to be logged in. Therefore, I used getJiraAuthenticationContext().setLoggedInUser(updateUser).

The problem is that after some time, the user sessions in JIRA are left over with a lot of "updateUser".

I cannot find an API to perform logout or session clearing.

Please help!! Thank you.

Best regards,



3 Answers:

Jeff Kirby · 247 karma ·

have you tried ActionContext.getSession().invalidate()?

TimY · 96 karma ·

Thank you for the reply.

But how can I get the ActionContext??

Jeff Kirby · 247 karma ·

ActionContext.getSession() is static like System.getCurrentTimeInMilliseconds(). It's always availiable in Jira

Mikkel Kragelund Nielsen · 551 karma ·

Are you using the REST API?

If you are, there is a bug. There should not be any session created:

Mikkel Kragelund Nielsen · 551 karma ·

Had the same problem: Using Atlassian Bot Killer to help maintain the amount of sessions.

This is a workaround, but I don't think they are planing to fix the problem.

Looking for something else?

Find Questions…

or Browse other questions tagged:

or Ask a Question