aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--juick-notifications/src/main/java/com/juick/components/configuration/NotificationsAppConfiguration.java12
-rw-r--r--juick-server/src/main/resources/juick.conf.example6
2 files changed, 12 insertions, 6 deletions
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 ff3a5a5a..67a551c4 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
@@ -1,12 +1,10 @@
package com.juick.components.configuration;
import com.juick.components.Notifications;
-import com.juick.configuration.DataConfiguration;
import com.notnoop.apns.APNS;
import com.notnoop.apns.ApnsService;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.PropertySource;
import org.springframework.core.env.Environment;
import org.springframework.http.client.ClientHttpRequestInterceptor;
@@ -30,10 +28,11 @@ public class NotificationsAppConfiguration {
@Bean
public RestTemplate rest() {
RestTemplate rest = new RestTemplate();
- List<ClientHttpRequestInterceptor> interceptors = Collections
- .singletonList(
- new BasicAuthorizationInterceptor(env.getProperty("api_user", "juick"),
- env.getProperty("api_password", "secret")));
+ List<ClientHttpRequestInterceptor> interceptors = Collections.singletonList(
+ new BasicAuthorizationInterceptor(
+ env.getProperty("api_user", "juick"),
+ env.getProperty("api_password", "secret")));
+
rest.setRequestFactory(new InterceptingClientHttpRequestFactory(rest.getRequestFactory(), interceptors));
return rest;
}
@@ -42,6 +41,7 @@ public class NotificationsAppConfiguration {
public Notifications push() {
return new Notifications(env, rest());
}
+
@Bean
public ApnsService apns() {
return APNS.newService().withCert(env.getProperty("ios_pkcs12_file"), env.getProperty("ios_pkcs12_password"))
diff --git a/juick-server/src/main/resources/juick.conf.example b/juick-server/src/main/resources/juick.conf.example
index e8ebf5d3..6a931ab5 100644
--- a/juick-server/src/main/resources/juick.conf.example
+++ b/juick-server/src/main/resources/juick.conf.example
@@ -43,6 +43,12 @@ template.showSponsors=false
# Show Sape scripts
template.showSape=true
+api_user=juick
+api_password=secret
+
+ios_pkcs12_file=
+ios_pkcs12_password=secret
+
twitter_consumer_key=
twitter_consumer_secret=