Skip to content
This repository was archived by the owner on Dec 4, 2023. It is now read-only.

Cleanup OAuth, use clean interceptor pattern#51

Merged
daveta merged 2 commits into
masterfrom
fix-intercept
Jul 6, 2018
Merged

Cleanup OAuth, use clean interceptor pattern#51
daveta merged 2 commits into
masterfrom
fix-intercept

Conversation

@daveta

@daveta daveta commented Jul 6, 2018

Copy link
Copy Markdown
Contributor

Cleans up alot of stuff, abandon C# style token resolve, and make fully async.

@daveta daveta requested a review from johnataylor July 6, 2018 15:57
HashMap <String, String> qstrings = new HashMap<>();
qstrings.put("userId", userId);
qstrings.put("connectionName", connectionName);
if (!StringUtils.isBlank(magicCode))

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.

single line if

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed

return null;
}
} catch (IOException e) {
e.printStackTrace();

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.

is eating the exception intended?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, failure condition to caller

if (statusCode == HTTP_OK)
return response.body().string();
} catch (IOException e) {
e.printStackTrace();

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.

eat exception intended?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah, hard to get context - these are retrieving strings and tokens and stuff. If it fails, just returns null or false in one case.

if (statusCode == HTTP_OK)
return;
} catch (IOException e) {
e.printStackTrace();

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.

eat exception?

@daveta daveta merged commit d778a72 into master Jul 6, 2018
@daveta daveta deleted the fix-intercept branch July 6, 2018 22:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants