-
Notifications
You must be signed in to change notification settings - Fork 68
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
feat: replace regions with v2 api #164
Conversation
@sidyag And here is the last pull request that remove all java-sdk-v1 dependencies |
@sidyag friendly bump |
@@ -61,15 +59,12 @@ public IAMOAuthBearerToken(String token) throws URISyntaxException { | |||
byte[] decodedBytes = Base64.getUrlDecoder().decode(tokenBytes); | |||
final String decodedPresignedUrl = new String(decodedBytes, StandardCharsets.UTF_8); | |||
final URI uri = new URI(decodedPresignedUrl); | |||
List<NameValuePair> params = URLEncodedUtils.parse(uri, StandardCharsets.UTF_8); |
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.
Why can't we use this anymore?
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.
Hi @sidyag , by removing AWS SDK V1, some transitive dependencies have been removed, then NameValuePair
and URLEncodedUtils
are no more available. I can have access again by adding org.apache.httpcomponents:httpclient:4.5.+
dependency if needed. I re-implemented the method to avoid adding the whole dependency
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.
LGTM apart from the one comment.
Description of changes:
Replace the v1 region API with V2. I do not succeed to find an exact equivalent, so to try to extract the region from the host, I check if I find the region id in the string, and if not, fallback to the default region provider.
I removed the sdk V1 dependency that have remove few helper method (from transiant dependencies), I reimplemented them instead of adding an extra dependency.
It should end the V1 SDK, unit tests are green, I tested for my own case, it works, hoping it will for everyone
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Will resolve #154