-
Notifications
You must be signed in to change notification settings - Fork 13
Add support for IAM Auth and LTv3 #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -215,7 +248,9 @@ public ToneAnalyzer toneAnalyzer() { | |||
public VisualRecognition visualRecognition() { | |||
VisualRecognition service = new VisualRecognition(vrConfig.getVersionDate()); | |||
configUrl(service, vrConfig); | |||
configBasicAuth(service, vrConfig); | |||
if (!configBasicAuth(service, vrConfig)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this line need to check for configApiKey()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. I think it does. And actually I think I will flip all these tests around to check for IAM first, and only when it is not provided to use the "legacy" auth. That will be a smaller code change.
Other than one comment I think it looks good so far 👍 |
Codecov Report
@@ Coverage Diff @@
## master #9 +/- ##
============================================
+ Coverage 96.8% 98.16% +1.35%
- Complexity 41 46 +5
============================================
Files 13 14 +1
Lines 94 109 +15
Branches 5 6 +1
============================================
+ Hits 91 107 +16
+ Partials 3 2 -1
Continue to review full report at Codecov.
|
Test for IAM auth has been added so I have removed the do not merge label. |
@lpatino10 @BarDweller I think this is ready to go. If one of you approve I will go ahead and merge. |
This PR adds support for Watson services that use IAM authentication. It also replaces the Language Translator V2 service with Language Translator V3.
The code in this PR is not yet fully tested, but I wanted to get feedback on these changes before going further.