Skip to content

Make IAM API call on separate thread #17

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

Merged
merged 3 commits into from
Mar 18, 2019
Merged

Conversation

lpatino10
Copy link
Contributor

@lpatino10 lpatino10 commented Mar 15, 2019

Related to this issue.

This change ensures that users don't have to make any special changes on Android going from U/P auth to IAM.

@lpatino10 lpatino10 requested a review from padamstx March 15, 2019 17:34
@@ -181,14 +183,32 @@ private boolean isRefreshTokenExpired() {
* @return object containing requested IAM token information
*/
private IamToken callIamApi(Request request) {
Call call = HttpClientSingleton.getInstance().createHttpClient().newCall(request);
ResponseConverter<IamToken> converter = ResponseConverterUtils.getObject(IamToken.class);
final IamToken[] returnToken = new IamToken[1];
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this work in Android? I think their have their own Thread management system

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just managed to test it out and it looks like Android accepts the Java threading just fine 👌

Copy link
Contributor

@germanattanasio germanattanasio left a comment

Choose a reason for hiding this comment

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

Looks good! and you added logging! 😱

@lpatino10 lpatino10 merged commit 111ea91 into master Mar 18, 2019
@lpatino10 lpatino10 deleted the new-thread-iam-token branch March 18, 2019 14:44
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