persandstrom / python-verisure

A python module for reading and changing status of verisure devices through verisure app api.
MIT License
139 stars 42 forks source link

Improved Login #147

Closed niro1987 closed 2 years ago

niro1987 commented 2 years ago

@persandstrom What do you think of these chages so far?

persandstrom commented 2 years ago

The changes look great, much clearer. A bit hesitant about that the cookie is updated on every request

niro1987 commented 2 years ago

A bit hesitant about that the cookie is updated on every request

Perhaps I could get rid of the _update_cookie function and implement it's logic (requesting a new access token) into the cookie_login function.

niro1987 commented 2 years ago

@persandstrom How about this?

persandstrom commented 2 years ago

The new solution would force the user to read installations when refreshing the cookie. Could you break out the refresh part to it's own function for now? After that we can merge the MR, which I believe is a nice refactoring so far.

niro1987 commented 2 years ago

Yes, you are right.

niro1987 commented 2 years ago

@persandstrom code updated accordingly, please review.

niro1987 commented 2 years ago

@persandstrom please review

persandstrom commented 2 years ago

Looks good!

niro1987 commented 2 years ago

Thanks. Anything left on your wish-list?

persandstrom commented 2 years ago

Not right now, thank you. Compared to v1 I believe that it is at a similar feature level.

persandstrom commented 2 years ago

Or, maybe, If you had some good examples of how to use the session API, I would appreciate if you could add it to the readme