-
Notifications
You must be signed in to change notification settings - Fork 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
Support session based authentication #31
base: master
Are you sure you want to change the base?
Support session based authentication #31
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
@@ -515,29 +519,49 @@ async def _async_initialize_valid_token(self) -> None: | |||
timeout=10, | |||
) as response: | |||
await response.text() | |||
#self.token = response.cookies["sessionToken"].value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
6.18-x also has also some endpoints (e.g., rest/v1/login
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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