diff --git a/src/config.js b/src/config.js index 1adf39ee..40409e62 100644 --- a/src/config.js +++ b/src/config.js @@ -21,10 +21,6 @@ const config = { prerenderToken: '', protocol: 'https', host: 'art.shlisselburg.org' - }, - - instagram: { - secret: '' } }; @@ -51,3 +47,5 @@ export const protocol = 'https://'; export const homeUrl = protocol + host; export const sitemapCacheTime = 600000;// 600 sec - cache purge period + +export const instagramToken = privateData['instagramToken']; diff --git a/src/core/service.js b/src/core/service.js new file mode 100644 index 00000000..3a80519c --- /dev/null +++ b/src/core/service.js @@ -0,0 +1,8 @@ +import {instagramToken} from '../config'; + +const services = { + instagram: instagramToken +}; + +export const checkAuth = (name, token) => name in services && services[name] === token; +