Skip to content
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

New global Medtronic authentication server #2909

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Copy link

@paul1956 paul1956 Jun 28, 2023

Choose a reason for hiding this comment

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

Host should not be hard coded it comes from loginSessionResponse.RequestMessage.RequestUri.Authority plus other components to build out the fill URI.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@paul1956 yes, thanks. I was thinking about modifying that part of the code, but my time is very limited currently so I just did a quick correction.
Actually the entire CareLink client should be refactored, there are some weak points and dirty solutions, but I don't have time for that now.

Choose a reason for hiding this comment

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

For the most part they are all derived from some less the elegant code, I have been cleaning mine up over the past few months trying unsuccessfully to get 2 Factor Authentication working. But I did fix this get remove the quotes string and use the data in message response it's still just 1 line.

Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ protected Response doLogin(Response loginSessionResponse) throws IOException {

url = new HttpUrl.Builder()
.scheme("https")
.host("mdtlogin.medtronic.com")
.host("mdtlogin-ocl.medtronic.com")
.addPathSegments("mmcl/auth/oauth/v2/authorize/login")
.addQueryParameter("locale", CARELINK_LOCALE_EN)
.addQueryParameter("country", this.carelinkCountry)
Expand Down