Hi guys,
I use the confluence-rest-client-7.9.3 library to access and modify a Confluence page from an Java application. Currently, the authentication to the Confluence server is done with user name and password e.g.
String userName = "user";
char[] password = "password".toCharArray();
AuthenticatedWebResourceProvider provider = AuthenticatedWebResourceProvider.createWithNewClient(url.getUrl());
provider.setAuthContext(username, password);
ListeningExecutorService listeningExecutorService = createListeningExecutorService();
RemoteContentService service = new RemoteContentServiceImpl(getProvider(), listeningExecutorService);
...
Now I want to change the authentication to use an access token (bearer token authentication). The library provides only the AuthenticatedWebResourceProvider which seems not to support access tokens.
How can I authenticate to the Confluence server with an access token from my Java application?
Cheers,
Andy