[tesla] Clarify and update how refresh tokens can be obtained (#12015)
* Clarify and update how refresh tokens can be obtained * Fix logging statement Signed-off-by: Kai Kreuzer <kai@openhab.org>
This commit is contained in:
@@ -207,7 +207,8 @@ public class TeslaAccountHandler extends BaseBridgeHandler {
|
||||
Response response = vehiclesTarget.request(MediaType.APPLICATION_JSON_TYPE)
|
||||
.header("Authorization", authHeader).get();
|
||||
|
||||
logger.debug("Querying the vehicle: Response: {}:{}", response.getStatus(), response.getStatusInfo());
|
||||
logger.debug("Querying the vehicle: Response: {}: {}", response.getStatus(),
|
||||
response.getStatusInfo().getReasonPhrase());
|
||||
|
||||
if (!checkResponse(response, true)) {
|
||||
logger.error("An error occurred while querying the vehicle");
|
||||
@@ -335,9 +336,9 @@ public class TeslaAccountHandler extends BaseBridgeHandler {
|
||||
}
|
||||
|
||||
if (!checkResponse(response, false)) {
|
||||
logger.debug("An error occurred while communicating with the vehicle during request {}: {}:{}", command,
|
||||
(response != null) ? response.getStatus() : "",
|
||||
(response != null) ? response.getStatusInfo() : "No Response");
|
||||
logger.debug("An error occurred while communicating with the vehicle during request {}: {}: {}",
|
||||
command, (response != null) ? response.getStatus() : "",
|
||||
(response != null) ? response.getStatusInfo().getReasonPhrase() : "No Response");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -166,6 +166,7 @@ public class TeslaSSOHandler {
|
||||
|
||||
try {
|
||||
Document doc = Jsoup.parse(loginPageResponse.getContentAsString());
|
||||
logger.trace("{}", doc.toString());
|
||||
Element loginForm = doc.getElementsByTag("form").first();
|
||||
|
||||
Iterator<Element> elIt = loginForm.getElementsByTag("input").iterator();
|
||||
|
||||
Reference in New Issue
Block a user