From f93c6a2e1bca880d20f07e8ddd15eadfeb39d730 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 28 Mar 2018 15:30:11 +0300 Subject: fix ws client authentication --- .../components/configuration/JuickServerWebsocketConfiguration.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/juick-notifications/src/main/java/com/juick/components/configuration/JuickServerWebsocketConfiguration.java b/juick-notifications/src/main/java/com/juick/components/configuration/JuickServerWebsocketConfiguration.java index 79459d72..0cecb597 100644 --- a/juick-notifications/src/main/java/com/juick/components/configuration/JuickServerWebsocketConfiguration.java +++ b/juick-notifications/src/main/java/com/juick/components/configuration/JuickServerWebsocketConfiguration.java @@ -56,8 +56,8 @@ public class JuickServerWebsocketConfiguration { try { ResponseEntity response = rest().exchange("https://api.juick.com/auth", HttpMethod.GET, null, String.class); - hash = jsonMapper.readValue(response.getBody(), String.class); - } catch (HttpClientErrorException | IOException e) { + hash = response.getBody(); + } catch (HttpClientErrorException e) { logger.warn("service component is not authenticated", e); } String websocketURI = UriComponentsBuilder.fromUriString(baseUri) -- cgit v1.2.3