From e7996bca12f58feca09e0e7cca13e247df3d44f5 Mon Sep 17 00:00:00 2001 From: Laurent ARNAL Date: Tue, 30 Jan 2024 09:14:04 +0100 Subject: [PATCH] div fixes Signed-off-by: Laurent ARNAL --- .../org/openhab/binding/linky/internal/LinkyAuthServlet.java | 5 +++-- .../openhab/binding/linky/internal/api/EnedisHttpApi.java | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bundles/org.openhab.binding.linky/src/main/java/org/openhab/binding/linky/internal/LinkyAuthServlet.java b/bundles/org.openhab.binding.linky/src/main/java/org/openhab/binding/linky/internal/LinkyAuthServlet.java index bd15331dbeb..2d9986d457c 100644 --- a/bundles/org.openhab.binding.linky/src/main/java/org/openhab/binding/linky/internal/LinkyAuthServlet.java +++ b/bundles/org.openhab.binding.linky/src/main/java/org/openhab/binding/linky/internal/LinkyAuthServlet.java @@ -118,8 +118,9 @@ public class LinkyAuthServlet extends HttpServlet { final String reqState = params.getString("state"); final String reqError = params.getString("error"); - replaceMap.put(KEY_PAGE_REFRESH, - params.isEmpty() ? "" : String.format(HTML_META_REFRESH_CONTENT, servletBaseURL)); + replaceMap.put(KEY_PAGE_REFRESH, ""); + + // params.isEmpty() ? "" : String.format(HTML_META_REFRESH_CONTENT, servletBaseURL) if (!StringUtil.isBlank(reqError)) { logger.debug("Spotify redirected with an error: {}", reqError); diff --git a/bundles/org.openhab.binding.linky/src/main/java/org/openhab/binding/linky/internal/api/EnedisHttpApi.java b/bundles/org.openhab.binding.linky/src/main/java/org/openhab/binding/linky/internal/api/EnedisHttpApi.java index c77dc4e7e6c..7ecaedd4529 100644 --- a/bundles/org.openhab.binding.linky/src/main/java/org/openhab/binding/linky/internal/api/EnedisHttpApi.java +++ b/bundles/org.openhab.binding.linky/src/main/java/org/openhab/binding/linky/internal/api/EnedisHttpApi.java @@ -114,6 +114,7 @@ public class EnedisHttpApi { try { Request request = httpClient.newRequest(url); request = request.method(HttpMethod.GET); + request = request.header("Authorization", config.token); ContentResponse result = request.send(); if (result.getStatus() == 307) {