Previously to 5.9 it was possible to define a TrustTokenAuthentication request and call Confluence REST through a Confluence Server plugin running on the same instance. With the deprecation of the SAL API I wanted to switch to ApplicationLinkService requests but fail to obtain the application link to Confluence itself.
ApplicationLink applicationLink = this.applicationLinkService.getPrimaryApplicationLink(ConfluenceApplicationType.class);
this returns null. Is there any way this can achieved?
I was hoping it would be possible to obtain a self-referencing application link
many thanks
Community moderators have prevented the ability to post new answers.
I took a completely different approach and went back to the SAL API. The newly introduced sal-trust-api brings back the TrustTokenAuthentication via
TrustedRequest request = trustedRequestFactory.createTrustedRequest(methodType, baseUrl + requestURL); request.addTrustedTokenAuthentication(this.getDomainName(baseUrl));
hope this will help someone who stumbles upon this in the future
What getDomainName() method is doing for you?
I am trying this but it is not working as it is returning 404 while the same rest call works well from browser.
Regards
Prakhar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No worries.
Got it working. Thanks!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.