Icon
Join thousands of Atlassian users for an unforgettable week of knowledge sharing, product training, networking, and fun. Atlassian Summit is Oct 10 - 13 in San Jose, CA – Register soon before tickets sell out.
Icon
Maintenance Notice: answers.atlassian.com will undergo maintenance on 24 Sep 2016, from 22:00 - 07:00 UTC. During this maintenance window, the service may be intermittently unavailable. See our status page for details.
 
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.  
      2
      1
      0

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

      1. Tin Wa 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

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

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