From c41d997b1046fcc7bf04e8abb317907425bdb714 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 30 Jan 2018 17:51:13 +0300 Subject: web: authenticate services over api --- .../configuration/NotificationsAppConfiguration.java | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'juick-notifications') diff --git a/juick-notifications/src/main/java/com/juick/components/configuration/NotificationsAppConfiguration.java b/juick-notifications/src/main/java/com/juick/components/configuration/NotificationsAppConfiguration.java index 5cd2b3cd..67293373 100644 --- a/juick-notifications/src/main/java/com/juick/components/configuration/NotificationsAppConfiguration.java +++ b/juick-notifications/src/main/java/com/juick/components/configuration/NotificationsAppConfiguration.java @@ -29,10 +29,6 @@ import java.util.List; @Import({ APNSConfiguration.class, MPNSConfiguration.class, GCMConfiguration.class, JuickServerComponentConfiguration.class}) public class NotificationsAppConfiguration extends BaseWebConfiguration { - @Value("${api_user:juick}") - private String apiUser; - @Value("${api_password:secret}") - private String apiSecret; @Bean public JuickServerComponent juickServerComponent() { @@ -43,16 +39,6 @@ public class NotificationsAppConfiguration extends BaseWebConfiguration { return new JuickServerReconnectManager(); } - @Bean - public RestTemplate rest() { - RestTemplate rest = new RestTemplate(); - List interceptors = Collections.singletonList( - new BasicAuthorizationInterceptor(apiUser, apiSecret)); - - rest.setRequestFactory(new InterceptingClientHttpRequestFactory(rest.getRequestFactory(), interceptors)); - return rest; - } - @Bean public Notifications push() { return new Notifications(); -- cgit v1.2.3