You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@unomi.apache.org by sh...@apache.org on 2017/12/01 13:44:34 UTC

incubator-unomi git commit: UNOMI-129 Update login integration example to use Unomi key since the login event is now protected by default. - Also updated thirdparty server documentation to reflect this change.

Repository: incubator-unomi
Updated Branches:
  refs/heads/master b70cda666 -> 8a0e83f8c


UNOMI-129 Update login integration example to use Unomi key since the login event is now protected by default.
- Also updated thirdparty server documentation to reflect this change.

Signed-off-by: Serge Huber <sh...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/8a0e83f8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/8a0e83f8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/8a0e83f8

Branch: refs/heads/master
Commit: 8a0e83f8c2fe2f273dfba22a4107d7e897e9acb6
Parents: b70cda6
Author: Serge Huber <sh...@apache.org>
Authored: Fri Dec 1 14:44:28 2017 +0100
Committer: Serge Huber <sh...@apache.org>
Committed: Fri Dec 1 14:44:28 2017 +0100

----------------------------------------------------------------------
 .../src/main/webapp/javascript/login-example.js                 | 3 +++
 src/site/markdown/versions/master/configuration.md              | 5 +++--
 2 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/8a0e83f8/samples/login-integration/src/main/webapp/javascript/login-example.js
----------------------------------------------------------------------
diff --git a/samples/login-integration/src/main/webapp/javascript/login-example.js b/samples/login-integration/src/main/webapp/javascript/login-example.js
index 3c01113..a28ac59 100644
--- a/samples/login-integration/src/main/webapp/javascript/login-example.js
+++ b/samples/login-integration/src/main/webapp/javascript/login-example.js
@@ -122,6 +122,9 @@
                 contentType: 'application/json; charset=utf-8',
                 dataType: 'json',
                 async: false,
+                headers : {
+                    'X-Unomi-Peer' : '670c26d1cc413346c3b2fd9ce65dab41' // this is configured in the etc/org.apache.unomi.thirdparty.cfg
+                },
                 success: function (data) {
                     console.log("Unomi response:", data);
                     bootstrapAlert.success("Successfully sent login event to Apache Unomi ! (profileId=" + data.profileId + ",properties.email=" + data.profileProperties.email + ",nbOfVisits=" + data.profileProperties.nbOfVisits + ")");

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/8a0e83f8/src/site/markdown/versions/master/configuration.md
----------------------------------------------------------------------
diff --git a/src/site/markdown/versions/master/configuration.md b/src/site/markdown/versions/master/configuration.md
index c8b1efa..0835f8b 100644
--- a/src/site/markdown/versions/master/configuration.md
+++ b/src/site/markdown/versions/master/configuration.md
@@ -47,9 +47,10 @@ with the following contents:
     index.name=context
     
 Secured events configuration
----------------------------
+----------------------------
 
-If you need to secure some events, that will be sent only by a trusted third party server, you can update the file :
+Unomi secures some events by default. You can find the default configuration in the following file (created after the
+first server startup):
 
     $MY_KARAF_HOME/etc/org.apache.unomi.thirdparty.cfg