IBM / python-sdk-core

The python-sdk-core repository contains core functionality required by Python code generated by the IBM OpenAPI SDK Generator.
Apache License 2.0
20 stars 27 forks source link

refactor: 💡 Refactor JWTTokenManager to introduce TokenManager #72

Closed bessbd closed 4 years ago

bessbd commented 4 years ago

Currently, JWTTokenManager is the top-most token manager class which does not allow introducing new token managers in code that uses the IBM Python SDK Core.

This commit refactors JWTTokenManager into an abstract base class of TokenManager and the JWT-specific parts to allow extending the Python SDK Core with non-JWT token managers.

This PR is analogous to https://github.com/IBM/node-sdk-core/pull/89

CLAassistant commented 4 years ago

CLA assistant check
All committers have signed the CLA.

codecov[bot] commented 4 years ago

Codecov Report

Merging #72 into master will increase coverage by 0.05%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #72      +/-   ##
==========================================
+ Coverage   97.89%   97.95%   +0.05%     
==========================================
  Files          17       18       +1     
  Lines         619      636      +17     
==========================================
+ Hits          606      623      +17     
  Misses         13       13              
Impacted Files Coverage Δ
ibm_cloud_sdk_core/base_service.py 93.87% <100.00%> (ø)
ibm_cloud_sdk_core/jwt_token_manager.py 100.00% <100.00%> (ø)
ibm_cloud_sdk_core/token_manager.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 419ce1f...75f619d. Read the comment docs.

bessbd commented 4 years ago

Thank you for the review, @mkistler ! I think I've addressed all the comments you've added. Please let me know what you think.

bessbd commented 4 years ago

Thank you for the review, @vmatyusGitHub ! I've left a response to your comments in https://github.com/IBM/python-sdk-core/pull/72#discussion_r429923545 . For some reason it doesn't show up here in the conversation tab for me.

bessbd commented 4 years ago

Hi @mkistler , I think I've addressed all your review feedback so far. Is there anything else you'd like changed for this PR?

ibm-devx-automation commented 4 years ago

:tada: This PR is included in version 3.0.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

bessbd commented 4 years ago

🎉! Thank you for the review, @mkistler and @vmatyusGitHub ! Also, thank you for the merge, @mkistler