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

[amazonechocontrol] improve login handling #8207

Merged
merged 2 commits into from
Jul 28, 2020
Merged

Conversation

J-N-K
Copy link
Member

@J-N-K J-N-K commented Jul 26, 2020

An issue has been found where the login to the amazon account fails. Device-ids generated by bindings-versions before #8139 may have problems to login if they do not conform to the specification. The binding was not properly detecting this and further logins re-used the device-id which failed again.

This PR adds a check for the correct format of the device-id and also adds a console command to fore renewal of all connection settings.

Signed-off-by: Jan N. Klug [email protected]

Signed-off-by: Jan N. Klug <[email protected]>
@J-N-K J-N-K requested a review from mgeramb as a code owner July 26, 2020 15:49
@TravisBuddy
Copy link

Travis tests were successful

Hey @J-N-K,
we found no major flaws with your code. Still you might want to look at this logfile, as we usually suggest some optional improvements.

@mgeramb
Copy link
Member

mgeramb commented Jul 27, 2020

Sorry, I have not seen your PR. I did the same here: #8211

As far as I see, it is very similar, the difference are that my check device id function does not thrown and catch an exception and that I did the regeneration of the device id only in the case if the login page is requested. In my opinion, this is more safe because if a token was not rejected by the amazon server, the connection keeps working.

Signed-off-by: Jan N. Klug <[email protected]>
@J-N-K
Copy link
Member Author

J-N-K commented Jul 27, 2020

@mgeramb I included your comments and did some more clarification on the device-id generation

@TravisBuddy
Copy link

Travis tests were successful

Hey @J-N-K,
we found no major flaws with your code. Still you might want to look at this logfile, as we usually suggest some optional improvements.

Copy link
Member

@kaikreuzer kaikreuzer left a comment

Choose a reason for hiding this comment

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

Thanks!

@kaikreuzer kaikreuzer merged commit 73bf368 into openhab:2.5.x Jul 28, 2020
@J-N-K J-N-K deleted the aec-console branch August 1, 2020 15:17
MPH80 pushed a commit to MPH80/openhab-addons that referenced this pull request Aug 3, 2020
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
DaanMeijer pushed a commit to DaanMeijer/openhab-addons that referenced this pull request Sep 1, 2020
CSchlipp pushed a commit to CSchlipp/openhab-addons that referenced this pull request Sep 12, 2020
markus7017 pushed a commit to markus7017/openhab-addons that referenced this pull request Sep 19, 2020
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.

4 participants