Authentication problem, accessing Confluence plugin REST API from new plugin

Nicole Pape July 4, 2016

Hello.

I'm developing a macro plugin that needs access to data of an existing plugin provided via its REST API (not using Java API because its classes are private to a point where I would have to rewrite all of its services, which I'm aiming to avoid). Both would run on the same instance of Confluence, version 5.9 upwards.

The problem is, the existing plugin is asking for authentication from my REST client.

Some leads I've tried to achieve this (in order of appearance) include:

  • SAL - no longer works, its method addTrustedTokenAuthentication() is deprecated
  • ApplicationLink - apparently it's not possible to link back to the same Confluence instance
  • SAL also has the TrustedRequestFactory... comments in this thread indicate there might be a way using this, but I can't seem to figure it out (yet): https://answers.atlassian.com/questions/32516558

It's beginning to look a lot like I will have to use Basic Authentication (hope not!). 

Is there any way to grab the current user credentials from the Confluence context and pass them on to another plugin running on the same instance?

Anyway, thank you for reading. Any help would be much appreciated.

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
Nicole Pape September 6, 2016

In case anyone has the same problem, I've posted and eventually answered this on SO:

http://stackoverflow.com/questions/38196994/atlassian-confluence-communication-authentication-between-plugins/39364039#39364039

 

TAGS
AUG Leaders

Atlassian Community Events