diff --git a/.gitignore b/.gitignore index b9179d0b404999b10b959af81c0867bcd25b6655..03780aac40be7a9a2ae772c8498c47195af7a72c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,10 @@ /node_modules +/src/config.pug /www/index.html /www/styles/ /www/scripts/ /www/lib/ +/www/oidc-client-config.json !/www/lib/sib-core !/www/lib/sib-router !/www/lib/sib-chat \ No newline at end of file diff --git a/Makefile b/Makefile index fbd04908a73a4b4af3caadbe4d5b96b90f5b2300..f593ba029260a877098cd350aba851a04a9cb53f 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ clean: git clean -fXd -install: node_modules copy_lib submodules +install: node_modules copy_lib copy_samples submodules submodules: git submodule init @@ -37,6 +37,11 @@ node_modules: copy_lib: @node copy_lib.js +# sample +copy_samples: + @cp -n src/config.sample.pug src/config.pug + @cp -n www/oidc-client-config.sample.json www/oidc-client-config.json + # pug $(DIST_DIR)/index.html: src/index.pug $(wildcard src/*.pug src/*/*.pug) @echo pug: $< ➜ $@ @@ -56,4 +61,4 @@ $(DIST_DIR)/%.js: src/%.js sync: rsync -rv www/* staging-app@ssh-staging-app.happy-dev.fr:~/staging-app.happy-dev.fr/ -.PHONY: default install submodules copy_lib build watch serve clean \ No newline at end of file +.PHONY: default install submodules copy_lib copy_samples build watch serve clean \ No newline at end of file diff --git a/src/config.pug b/src/config.pug index 8a83ec03d33727922ccb442e3e2a9fea56f30b3e..0e48b6933d7e633d7510ef373c9c34cd861a85cb 100644 --- a/src/config.pug +++ b/src/config.pug @@ -1,3 +1,3 @@ //- var sdn = process.env.SDN || 'http://127.0.0.1:8000' -- var sdn = process.env.SDN || 'https://test-paris.happy-dev.fr' +- var sdn = process.env.SDN || '127.0.0.1:8000' - var cdn = process.env.CDN || 'https://cdn.happy-dev.fr' \ No newline at end of file diff --git a/src/config.sample.pug b/src/config.sample.pug new file mode 100644 index 0000000000000000000000000000000000000000..0e48b6933d7e633d7510ef373c9c34cd861a85cb --- /dev/null +++ b/src/config.sample.pug @@ -0,0 +1,3 @@ +//- var sdn = process.env.SDN || 'http://127.0.0.1:8000' +- var sdn = process.env.SDN || '127.0.0.1:8000' +- var cdn = process.env.CDN || 'https://cdn.happy-dev.fr' \ No newline at end of file diff --git a/src/dependencies.pug b/src/dependencies.pug index deb579dce06f8c53ba4591c91a7b4d048adf6301..7791200c2f8fdf16ae3526b0d1eaa2af60a2885c 100644 --- a/src/dependencies.pug +++ b/src/dependencies.pug @@ -1,10 +1,9 @@ // Scripts +//- script(src="https://unpkg.com/@webcomponents/webcomponentsjs@1.2.7/webcomponents-loader.js") script(src="/lib/webcomponentsjs/webcomponents-loader.js") //- script(src="lib/html-imports.js") -//- script(src="https://unpkg.com/@webcomponents/webcomponentsjs@1.2.7/webcomponents-loader.js") script(src='/lib/sib-chat/3rdparty/sib-oidc-client.js') - script(src="/scripts/index.js") // Stylesheets @@ -26,4 +25,4 @@ link(rel='import', href='/lib/sib-chat/sib-chat.html') //- cdn link(rel='import', href="https://cdn.happy-dev.fr/sib-core/sib-display.html") link(rel='import', href="https://cdn.happy-dev.fr/sib-router/sib-router.html") - //- link(rel='import', href="https://cdn.happy-dev.fr/sib-chat/sib-chat.html") \ No newline at end of file + link(rel='import', href="https://cdn.happy-dev.fr/sib-chat/sib-chat.html") \ No newline at end of file diff --git a/www/oidc-client-config.json b/www/oidc-client-config.json index 5cbb8d85af07393e43fb355bf848809eef8d7ef8..83cabe4cadff594a79f22545c4aa039aa85045d9 100644 --- a/www/oidc-client-config.json +++ b/www/oidc-client-config.json @@ -7,5 +7,4 @@ "automaticSilentRenew": true, "silent_redirect_uri": "https://staging-app.happy-dev.fr", "loadUserInfo": true -} - +} \ No newline at end of file diff --git a/www/oidc-client-config.sample.json b/www/oidc-client-config.sample.json new file mode 100644 index 0000000000000000000000000000000000000000..3fc26ae912d7080bf5d9b6b43b5b0ff9b4ede888 --- /dev/null +++ b/www/oidc-client-config.sample.json @@ -0,0 +1,10 @@ +{ + "authority": "https://test-paris.happy-dev.fr/openid/", + "client_id": "125356", + "redirect_uri": "http://127.0.0.1:3000", + "response_type": "id_token token", + "scope": "openid profile email", + "automaticSilentRenew": true, + "silent_redirect_uri": "http://127.0.0.1:3000", + "loadUserInfo": true +} \ No newline at end of file