Support session based authentication#31
Open
kvalev wants to merge 3 commits intohome-assistant-ecosystem:masterfrom
Open
Support session based authentication#31kvalev wants to merge 3 commits intohome-assistant-ecosystem:masterfrom
kvalev wants to merge 3 commits intohome-assistant-ecosystem:masterfrom
Conversation
41671ed to
f6d67f9
Compare
Newer Connect Box software uses a session-based authentication approach. This commit adds backwards compatible support for the new authentication approach and removes a couple of data model fields, which have been removed from the latest Connect Box software.
ff0075c to
f977880
Compare
Add a configuration parameter whether the password should be sha256 encrypted. Newer Connect Box models require an encrypted password, but leave it to the user whether they want to do it themselves.
f977880 to
ed498d2
Compare
fabaff
reviewed
Mar 7, 2023
| timeout=10, | ||
| ) as response: | ||
| await response.text() | ||
| #self.token = response.cookies["sessionToken"].value |
Member
There was a problem hiding this comment.
On a Swiss Connect Box from UPC (LG-RDK_CH7465LG-NCIP-6.18-2206.7.2-NOSH) common_page/login.html give me a 404.
At first glances it looks like that _async_initialize_valid_token() is no longer needed.
Author
There was a problem hiding this comment.
Does the example script work for you when you remove the method? On my 6.15.20.3-GA-NOSH its still needed for the authentication flow
Member
There was a problem hiding this comment.
6.18-x also has also some endpoints (e.g., rest/v1/login).
Author
There was a problem hiding this comment.
Pushed a fix, which works for my version and hopefully for yours as well. Can you give it another go?
On older Connect Box software there is a permanent redirect to the index page, while on newer ones the login page has been removed altogether.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Newer Connect Box software uses a session-based authentication approach. This commit adds backwards compatible support for the new authentication approach and removes a couple of data model fields, which have been removed from the latest Connect Box software.
Follow up from #28