diff options
author | Vitaly Takmazov | 2016-09-21 22:05:11 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2016-09-21 22:05:11 +0300 |
commit | 03b9bb980287d8f5578d1caec7a19e56f448e40f (patch) | |
tree | dbf4eca2245c63c2c36874c12d8f3f154c70c6b0 /juick-www | |
parent | 611cecae107980963979f71a756be3120000772a (diff) |
move facebook credentials to config
Diffstat (limited to 'juick-www')
-rw-r--r-- | juick-www/src/main/java/com/juick/www/FacebookLogin.java | 11 | ||||
-rw-r--r-- | juick-www/src/main/java/com/juick/www/Main.java | 3 |
2 files changed, 10 insertions, 4 deletions
diff --git a/juick-www/src/main/java/com/juick/www/FacebookLogin.java b/juick-www/src/main/java/com/juick/www/FacebookLogin.java index a448ea27..5cecf1ef 100644 --- a/juick-www/src/main/java/com/juick/www/FacebookLogin.java +++ b/juick-www/src/main/java/com/juick/www/FacebookLogin.java @@ -40,9 +40,14 @@ public class FacebookLogin { private static final Logger logger = Logger.getLogger(FacebookLogin.class.getName()); - private static final String FACEBOOK_APPID = "130568668304"; - private static final String FACEBOOK_SECRET = "95813bfb6ab8f473410c50d4f971649e"; - private static final String FACEBOOK_REDIRECT = "http://juick.com/_fblogin"; + private final String FACEBOOK_APPID; + private final String FACEBOOK_SECRET; + private final String FACEBOOK_REDIRECT = "http://juick.com/_fblogin"; + + public FacebookLogin(String ApplicationID, String secret) { + this.FACEBOOK_APPID = ApplicationID; + this.FACEBOOK_SECRET = secret; + } protected void doGet(JdbcTemplate sql, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String fbstate; diff --git a/juick-www/src/main/java/com/juick/www/Main.java b/juick-www/src/main/java/com/juick/www/Main.java index af8711ed..00ce6bb2 100644 --- a/juick-www/src/main/java/com/juick/www/Main.java +++ b/juick-www/src/main/java/com/juick/www/Main.java @@ -66,7 +66,7 @@ public class Main extends HttpServlet implements Stream.StreamListener { User pagesUser = new User(); UserThread pagesUserThread = new UserThread(); NewMessage pagesNewMessage; - FacebookLogin loginFacebook = new FacebookLogin(); + FacebookLogin loginFacebook; VKontakteLogin loginVK = new VKontakteLogin(); TwitterAuth twitterAuth; SignUp signup = new SignUp(); @@ -96,6 +96,7 @@ public class Main extends HttpServlet implements Stream.StreamListener { conf.getProperty("xmpp_password"), NumberUtils.toInt(conf.getProperty("xmpp_port", ""), 5347)); twitterAuth = new TwitterAuth(conf.getProperty("twitter_consumer_key"), conf.getProperty("twitter_consumer_secret")); + loginFacebook = new FacebookLogin(conf.getProperty("facebook_appid"), conf.getProperty("facebook_secret")); String tmpDir = conf.getProperty("upload_tmp_dir", "/var/www/juick.com/i/tmp/"); Utils.setTmpDir(tmpDir); String imgPath = conf.getProperty("img_path", "/var/www/juick.com/i/"); |