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

raZberry: Login again after session expires #844

Merged
merged 1 commit into from
Feb 26, 2022
Merged

Conversation

tobser
Copy link
Contributor

@tobser tobser commented Feb 26, 2022

If the session to z-way expires, a 401-message is receive after sending a
command. This change clears all existing cookies and starts a new login
after 401 was seen.
The internal command queue was change to store only the command URL
instead of the complete command line. The command line is now created
before each request to use always the latest session cookie.

The Issue fixed here can easily be reproduced:

  1. Start misterhouse
  2. Go to Z-way Settings -> User Management
  3. Select the user misterhouse uses to log into z-way
  4. Klick "Logout all sessions"
  5. Use misterhouse to send a z-wave command

If the session to z-way expires, a 401-message is receive after sending a
command. This change clears all existing cookies and starts a new login
after 401 was seen.
The internal command queue was change to store only the command url
instead of the complete commandline. The commandline is now created
before each request to use always the latest session cookie.
@hplato
Copy link
Collaborator

hplato commented Feb 26, 2022

Nice Tobi. I'm going to merge this into my setup. I've been testing master, so this will be a good inclusion. I'll also update the module version number.

@hplato hplato merged commit b8471d4 into hollie:master Feb 26, 2022
@hplato hplato mentioned this pull request Aug 22, 2023
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.

2 participants