IBM / cloudant-java-sdk

Cloudant SDK for Java
Apache License 2.0
22 stars 17 forks source link

refactor: use setClient and getClient of core #599

Closed mojito317 closed 1 month ago

mojito317 commented 1 month ago

PR summary

The purpose of this PR was originally calling and returning the result of core's invokeRequest from our requestToken method, but the convert method called in invokeRequest takes variables only from the response body. With this feature response headers which are essential to CouchDBSessionAuthenticator cannot be reverse engineered from invokeRequest.

Although I could change sessionAuthClient with getter and setter methods introduced in https://github.com/IBM/java-sdk-core/pull/174.

PR Checklist

Please make sure that your PR fulfills the following requirements:

PR Type

What is the current behavior?

sessionAuthClient is set and being used from the requestToken method.

What is the new behavior?

The client of the class is set and being used from the requestToken method.

Does this PR introduce a breaking change?

Other information

mojito317 commented 1 month ago

Thanks for the review @ricellis! I am about to merge this PR.