Skip to content

refactor: use setClient and getClient of core - #599

Merged
mojito317 merged 2 commits into
mainfrom
681-use-cores-invokerequest-in-CouchDbSessionAuthenticator
Sep 10, 2024
Merged

refactor: use setClient and getClient of core#599
mojito317 merged 2 commits into
mainfrom
681-use-cores-invokerequest-in-CouchDbSessionAuthenticator

Conversation

@mojito317

@mojito317 mojito317 commented Sep 6, 2024

Copy link
Copy Markdown
Contributor

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 IBM/java-sdk-core#174.

PR Checklist

Please make sure that your PR fulfills the following requirements:

  • The commit message follows the
    Angular Commit Message Guidelines.
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • New tests
  • Build/CI related changes
  • Documentation content changes
  • Other (please describe)

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?

  • Yes
  • No

Other information

@mojito317 mojito317 self-assigned this Sep 6, 2024
@mojito317
mojito317 force-pushed the 681-use-cores-invokerequest-in-CouchDbSessionAuthenticator branch from 5b8d870 to 22b3dca Compare September 6, 2024 08:02
@ricellis ricellis changed the title refactor: use core's setClient() and getClient() refactor: use core's setClient and getClient Sep 6, 2024
@ricellis
ricellis self-requested a review September 6, 2024 08:43
@mojito317 mojito317 changed the title refactor: use core's setClient and getClient refactor: use setClient and getClient of core Sep 6, 2024
@mojito317
mojito317 force-pushed the 681-use-cores-invokerequest-in-CouchDbSessionAuthenticator branch from da4629c to 9bb5e1d Compare September 9, 2024 14:30
@mojito317
mojito317 force-pushed the 681-use-cores-invokerequest-in-CouchDbSessionAuthenticator branch from 9bb5e1d to 5243968 Compare September 9, 2024 14:30

@ricellis ricellis left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@mojito317

Copy link
Copy Markdown
Contributor Author

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

@mojito317
mojito317 merged commit e100fa4 into main Sep 10, 2024
@mojito317
mojito317 deleted the 681-use-cores-invokerequest-in-CouchDbSessionAuthenticator branch September 10, 2024 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants