1
0
-1

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,

TimY

    CommentAdd your comment...

    4 answers

    1.  
      1
      0
      -1

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

      1. tinwa_yeung

        Thank you for the reply.

        But how can I get the ActionContext??

      2. Jeff Kirby

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

      CommentAdd your comment...
    2.  
      1
      0
      -1

      Are you using the REST API?

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

      https://jira.atlassian.com/browse/JRA-27047

        CommentAdd your comment...
      1.  
        1
        0
        -1

        Are you using the REST API?

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

        https://jira.atlassian.com/browse/JRA-27047

          CommentAdd your comment...
        1.  
          1
          0
          -1

          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.

            CommentAdd your comment...