Skip to content

Commit

Permalink
[verisure] Better detection of login status (openhab#8341)
Browse files Browse the repository at this point in the history
Closes openhab#8315

Signed-off-by: Jan Gustafsson <[email protected]>
  • Loading branch information
jannegpriv authored and CSchlipp committed Sep 12, 2020
1 parent 8e629c5 commit b641d62
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -278,11 +278,11 @@ private boolean areWeLoggedIn() throws ExecutionException, InterruptedException,

switch (response.getStatus()) {
case HttpStatus.OK_200:
if (content.contains("<title>MyPages</title>")) {
if (content.contains("<link href=\"/newapp")) {
setPasswordFromCookie();
return true;
} else {
logger.debug("Not on mypages,verisure.com, we need to login again!");
logger.debug("We need to login again!");
return false;
}
case HttpStatus.MOVED_TEMPORARILY_302:
Expand Down

0 comments on commit b641d62

Please sign in to comment.