unomi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shu...@apache.org
Subject svn commit: r1832035 [6/6] - in /incubator/unomi/website: ./ rest-api-doc/input/ unomi-api/apidocs/ unomi-api/apidocs/org/apache/unomi/api/ unomi-api/apidocs/org/apache/unomi/api/actions/ unomi-api/apidocs/org/apache/unomi/api/actions/class-use/ unomi-...
Date Tue, 22 May 2018 15:17:15 GMT
Added: incubator/unomi/website/versions/master/consent-api.html
URL: http://svn.apache.org/viewvc/incubator/unomi/website/versions/master/consent-api.html?rev=1832035&view=auto
==============================================================================
--- incubator/unomi/website/versions/master/consent-api.html (added)
+++ incubator/unomi/website/versions/master/consent-api.html Tue May 22 15:17:14 2018
@@ -0,0 +1,406 @@
+
+<!DOCTYPE html>
+<!--
+ Generated by Apache Maven Doxia at 2018-05-22
+ Rendered using Reflow Maven Skin 1.1.1 (http://andriusvelykis.github.io/reflow-maven-skin)
+-->
+<html  xml:lang="en" lang="en">
+
+	<head>
+		<meta charset="UTF-8" />
+		<title>Consent API | Apache Unomi</title>
+		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
+		<meta name="description" content="" />
+		<meta http-equiv="content-language" content="en" />
+ 
+		<link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap.min.css"
rel="stylesheet" />
+		<link href="../..//css/docs.css" rel="stylesheet" />
+		<link href="../..//css/reflow-skin.css" rel="stylesheet" />
+
+		<link href="http://yandex.st/highlightjs/7.5/styles/github.min.css" rel="stylesheet"
/>
+
+		<link href="../..//css/lightbox.css" rel="stylesheet" />
+
+		<link href="../..//css/site.css" rel="stylesheet" />
+		<link href="../..//css/print.css" rel="stylesheet" media="print" />
+
+		<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
+		<!--[if lt IE 9]>
+			<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
+		<![endif]-->
+
+
+
+		<!-- Google Analytics -->
+		<script type="text/javascript">
+
+			var _gaq = _gaq || [];
+			_gaq.push(['_setAccount', 'UA-70313240-1']);
+			_gaq.push(['_trackPageview']);
+
+			(function() {
+				var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+				ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+				var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+			})();
+
+		</script>
+		</head>
+
+	<body class="page-versions-master-consent-api project-unomi-root" data-spy="scroll" data-offset="60"
data-target="#toc-scroll-target">
+
+		<div class="navbar navbar-fixed-top">
+			<div class="navbar-inner">
+				<div class="container">
+					<a class="btn btn-navbar" data-toggle="collapse" data-target="#top-nav-collapse">
+						<span class="icon-bar"></span>
+						<span class="icon-bar"></span>
+						<span class="icon-bar"></span>
+					</a>
+					<a class="brand" href="../.."><img src="http://unomi.incubator.apache.org/images/unomi-86x20.png"
/></a>
+					<div class="nav-collapse collapse" id="top-nav-collapse">
+						<ul class="nav pull-right">
+							<li class="dropdown">
+								<a href="#" class="dropdown-toggle" data-toggle="dropdown">Download <b class="caret"></b></a>
+								<ul class="dropdown-menu">
+									<li ><a href="../../download.html" title="Packages">Packages</a></li>
+									<li ><a href="../../license.html" title="License">License</a></li>
+								</ul>
+							</li>
+							<li class="dropdown">
+								<a href="#" class="dropdown-toggle" data-toggle="dropdown">Documentation <b
class="caret"></b></a>
+								<ul class="dropdown-menu">
+									<li ><a href="../../" title="Site Home">Site Home</a></li>
+									<li ><a href="../../main.html" title="Main documentation">Main documentation</a></li>
+									<li ><a href="../../usecases.html" title="More use cases">More use cases</a></li>
+									<li ><a href="../../rest-api-doc/index.html" title="REST API documentation">REST
API documentation</a></li>
+									<li ><a href="../../unomi-api/apidocs/index.html" title="API Javadoc">API
Javadoc</a></li>
+								</ul>
+							</li>
+							<li class="dropdown">
+								<a href="#" class="dropdown-toggle" data-toggle="dropdown">Standard <b class="caret"></b></a>
+								<ul class="dropdown-menu">
+									<li ><a href="https://www.oasis-open.org/committees/cxs/" title="OASIS
Context Server Technical Committee" class="externalLink">OASIS Context Server Technical
Committee</a></li>
+								</ul>
+							</li>
+							<li class="dropdown">
+								<a href="#" class="dropdown-toggle" data-toggle="dropdown">Privacy <b class="caret"></b></a>
+								<ul class="dropdown-menu">
+									<li ><a href="../../privacy-policy.html" title="Site policy">Site policy</a></li>
+								</ul>
+							</li>
+							<li class="dropdown">
+								<a href="#" class="dropdown-toggle" data-toggle="dropdown">Contribute <b
class="caret"></b></a>
+								<ul class="dropdown-menu">
+									<li ><a href="../../mail-lists.html" title="Mailing lists">Mailing lists</a></li>
+									<li ><a href="../../source-repository.html" title="Source">Source</a></li>
+									<li ><a href="../../issue-tracking.html" title="Issues">Issues</a></li>
+								</ul>
+							</li>
+							<li class="dropdown">
+								<a href="#" class="dropdown-toggle" data-toggle="dropdown">Community <b
class="caret"></b></a>
+								<ul class="dropdown-menu">
+									<li ><a href="../../mail-lists.html" title="Mailing lists">Mailing lists</a></li>
+									<li ><a href="../../team-list.html" title="Team">Team</a></li>
+									<li ><a href="../../maturity-model-report.html" title="Maturity model report
card">Maturity model report card</a></li>
+									<li ><a href="http://www.apache.org" title="The Apache Software Foundation"
class="externalLink">The Apache Software Foundation</a></li>
+									<li ><a href="http://www.apache.org/foundation/sponsorship.html" title="Sponsorship"
class="externalLink">Sponsorship</a></li>
+									<li ><a href="http://www.apache.org/foundation/thanks.html" title="Thanks"
class="externalLink">Thanks</a></li>
+								</ul>
+							</li>
+						</ul>
+					</div><!--/.nav-collapse -->
+				</div>
+			</div>
+		</div>
+
+	<div class="container">
+
+	<!-- Masthead
+	================================================== -->
+
+	<header>
+		<div>
+			<ul class="breadcrumb">
+				<li class="publishDate version-date">Last Published: 2018-05-22</li>
+			</ul>
+		</div>
+	</header>
+
+	<div class="main-body">
+	<div class="row">
+		<div class="span8">
+			<div class="body-content">
+<!-- ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License. --> 
+<div class="page-header">
+ <h1 id="consent_api">Consent API</h1>
+</div> 
+<p>Starting with Apache Unomi 1.3 (still in development), a new API for consent management
is now available. This API is designed to be able to store/retrieve/update visitor consents
in order to comply with new privacy regulations such as the <a class="externalLink" href="https://en.wikipedia.org/wiki/General_Data_Protection_Regulation">GDPR</a>.</p>

+<div class="section"> 
+ <h2 id="Profiles_with_consents">Profiles with consents</h2> 
+ <p>Visitor profiles now contain a new Consent object that contains the following information:</p>

+ <ul> 
+  <li>a scope</li> 
+  <li>a type identifier for the consent. This can be any key to reference a consent.
Note that Unomi does not manage consent definitions, it only stores/retrieves consents for
each profile based on this type</li> 
+  <li>a status : GRANT, DENY or REVOKED</li> 
+  <li>a status date (the date at which the status was updated)</li> 
+  <li>a revocation date, in order to comply with GDPR this is usually set at two years</li>

+ </ul> 
+ <p>Here is an example of a Profile with a consent attached to it:</p> 
+ <div class="source"> 
+  <div class="source"> 
+   <pre>{
+    &quot;profileId&quot;: &quot;8cbe380f-57bb-419d-97bf-24bf30178550&quot;,
+    &quot;sessionId&quot;: &quot;0d755f4e-154a-45c8-9169-e852e1d706d9&quot;,
+    &quot;consents&quot;: {
+        &quot;example/newsletter&quot;: {
+            &quot;scope&quot;: &quot;example&quot;,
+            &quot;typeIdentifier&quot;: &quot;newsletter&quot;,
+            &quot;status&quot;: &quot;GRANTED&quot;,
+            &quot;statusDate&quot;: &quot;2018-05-22T09:44:33Z&quot;,
+            &quot;revokeDate&quot;: &quot;2020-05-21T09:44:33Z&quot;
+        }
+    }
+}
+</pre> 
+  </div> 
+ </div> 
+ <p>It is of course possible to have multiple consents defined for a single visitor
profile.</p> 
+</div> 
+<div class="section"> 
+ <h2 id="Consent_type_definitions">Consent type definitions</h2> 
+ <p>Apache Unomi does not manage consent definitions, it leaves that to an external
system (for example a CMS) so that it can handle user-facing UIs to create, update, internationalize
and present consent definitions to end users. </p> 
+ <p>The only thing that is import to Apache Unomi to manage visitor consents is a globally
unique key, that is called the consent type.</p> 
+</div> 
+<div class="section"> 
+ <h2 id="Creating__update_a_visitor_consent">Creating / update a visitor consent</h2>

+ <p>A new built-in event type called “modifyConsent” can be sent to Apache
Unomi to update a consent for the current profile.</p> 
+ <p>Here is an example of such an event:</p> 
+ <div class="source"> 
+  <div class="source"> 
+   <pre>{
+  &quot;events&quot;: [
+    {
+      &quot;scope&quot;: &quot;example&quot;,
+      &quot;eventType&quot;: &quot;modifyConsent&quot;,
+      &quot;source&quot;: {
+        &quot;itemType&quot;: &quot;page&quot;,
+        &quot;scope&quot;: &quot;example&quot;,
+        &quot;itemId&quot;: &quot;anItemId&quot;
+      },
+      &quot;target&quot;: {
+        &quot;itemType&quot;: &quot;anyType&quot;,
+        &quot;scope&quot;: &quot;example&quot;,
+        &quot;itemId&quot;: &quot;anyItemId&quot;
+      },
+      &quot;properties&quot;: {
+        &quot;consent&quot;: {
+          &quot;typeIdentifier&quot;: &quot;newsletter&quot;,
+          &quot;scope&quot;: &quot;example&quot;,
+          &quot;status&quot;: &quot;GRANTED&quot;,
+          &quot;statusDate&quot;: &quot;2018-05-22T09:27:09.473Z&quot;,
+          &quot;revokeDate&quot;: &quot;2020-05-21T09:27:09.473Z&quot;
+        }
+      }
+    }
+  ]
+}
+</pre> 
+  </div> 
+ </div> 
+ <p>You could send it using the following curl request:</p> 
+ <div class="source"> 
+  <div class="source"> 
+   <pre>curl -H &quot;Content-Type: application/json&quot; -X POST -d '{&quot;source&quot;:{&quot;itemId&quot;:&quot;homepage&quot;,&quot;itemType&quot;:&quot;page&quot;,&quot;scope&quot;:&quot;example&quot;},&quot;events&quot;:[{&quot;scope&quot;:&quot;example&quot;,&quot;eventType&quot;:&quot;modifyConsent&quot;,&quot;source&quot;:{&quot;itemType&quot;:&quot;page&quot;,&quot;scope&quot;:&quot;example&quot;,&quot;itemId&quot;:&quot;anItemId&quot;},&quot;target&quot;:{&quot;itemType&quot;:&quot;anyType&quot;,&quot;scope&quot;:&quot;example&quot;,&quot;itemId&quot;:&quot;anyItemId&quot;},&quot;properties&quot;:{&quot;consent&quot;:{&quot;typeIdentifier&quot;:&quot;newsletter&quot;,&quot;scope&quot;:&quot;example&quot;,&quot;status&quot;:&quot;GRANTED&quot;,&quot;statusDate&quot;:&quot;2018-05-22T09:27:09.473Z&quot;,&quot;revokeDate&quot;:&quot;2020-05-21T09:27:09.473Z&quot;}}}]}'
http://localhost:8181/context.json?sessionId=1234
+</pre> 
+  </div> 
+ </div> 
+</div> 
+<div class="section"> 
+ <h2 id="How_it_works_internally">How it works (internally)</h2> 
+ <p>Upon receiving this event, Apache Unomi will trigger the modifyAnyConsent rule
that has the following definition:</p> 
+ <div class="source"> 
+  <div class="source"> 
+   <pre>{
+  &quot;metadata&quot; : {
+    &quot;id&quot;: &quot;modifyAnyConsent&quot;,
+    &quot;name&quot;: &quot;Modify any consent&quot;,
+    &quot;description&quot; : &quot;Modify any consent and sets the consent in
the profile&quot;,
+    &quot;readOnly&quot;:true
+  },
+
+  &quot;condition&quot; : {
+    &quot;type&quot;: &quot;modifyAnyConsentEventCondition&quot;,
+    &quot;parameterValues&quot;: {
+    }
+  },
+
+  &quot;actions&quot; : [
+    {
+      &quot;type&quot;: &quot;modifyConsentAction&quot;,
+      &quot;parameterValues&quot;: {
+      }
+    }
+  ]
+
+}
+</pre> 
+  </div> 
+ </div> 
+ <p>As we can see this rule is pretty simple it will simply execute the modifyConsentAction
that is implemented by the <a class="externalLink" href="https://github.com/apache/incubator-unomi/blob/9f1bab437fd93826dc54d318ed00d3b2e3161437/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/actions/ModifyConsentAction.java">ModifyConsentAction
Java class</a></p> 
+ <p>This class will update the current visitor profile to add/update/revoke any consents
that are included in the event.</p> 
+</div>
+			</div>
+		</div>
+		<div class="span4">
+			<div id="toc-sidebar">
+				<div class="well">
+					<ul class="nav nav-list">
+						<li class="nav-header">Table of Contents</li>
+		<li class="dropdown"><a href="#consent_api" title="Consent API">Consent API
<b class="caret"></b></a>
+			<ul class="nav nav-list">
+		<li><a href="#Profiles_with_consents" title="Profiles with consents">Profiles
with consents</a>
+		<li><a href="#Consent_type_definitions" title="Consent type definitions">Consent
type definitions</a>
+		<li><a href="#Creating__update_a_visitor_consent" title="Creating / update a visitor
consent">Creating / update a visitor consent</a>
+		<li><a href="#How_it_works_internally" title="How it works (internally)">How
it works (internally)</a>
+				<li class="divider"></li>
+			</ul>
+		</li>
+					</ul>
+				</div>
+			</div>
+		</div>
+	</div>
+	</div>
+
+	</div><!-- /container -->
+
+	<!-- Footer
+	================================================== -->
+	<footer class="well">
+		<div class="container">
+			<div class="row">
+				<div class="span2 bottom-nav">
+					<ul class="nav nav-list">
+						<li class="nav-header">Download</li>
+						<li >
+							<a href="../../download.html" title="Packages">Packages</a>
+						</li>
+						<li >
+							<a href="../../license.html" title="License">License</a>
+						</li>
+						<li class="nav-header">Contribute</li>
+						<li >
+							<a href="../../mail-lists.html" title="Mailing lists">Mailing lists</a>
+						</li>
+						<li >
+							<a href="../../source-repository.html" title="Source">Source</a>
+						</li>
+						<li >
+							<a href="../../issue-tracking.html" title="Issues">Issues</a>
+						</li>
+					</ul>
+				</div>
+				<div class="span2 bottom-nav">
+					<ul class="nav nav-list">
+						<li class="nav-header">Documentation</li>
+						<li >
+							<a href="../../" title="Site Home">Site Home</a>
+						</li>
+						<li >
+							<a href="../../main.html" title="Main documentation">Main documentation</a>
+						</li>
+						<li >
+							<a href="../../usecases.html" title="More use cases">More use cases</a>
+						</li>
+						<li >
+							<a href="../../rest-api-doc/index.html" title="REST API documentation">REST
API documentation</a>
+						</li>
+						<li >
+							<a href="../../unomi-api/apidocs/index.html" title="API Javadoc">API Javadoc</a>
+						</li>
+					</ul>
+				</div>
+				<div class="span2 bottom-nav">
+					<ul class="nav nav-list">
+						<li class="nav-header">Standard</li>
+						<li >
+							<a href="https://www.oasis-open.org/committees/cxs/" title="OASIS Context Server
Technical Committee" class="externalLink">OASIS Context Server Technical Committee</a>
+						</li>
+						<li class="nav-header">Privacy</li>
+						<li >
+							<a href="../../privacy-policy.html" title="Site policy">Site policy</a>
+						</li>
+						<li class="nav-header">Community</li>
+						<li >
+							<a href="../../mail-lists.html" title="Mailing lists">Mailing lists</a>
+						</li>
+						<li >
+							<a href="../../team-list.html" title="Team">Team</a>
+						</li>
+						<li >
+							<a href="../../maturity-model-report.html" title="Maturity model report card">Maturity
model report card</a>
+						</li>
+						<li >
+							<a href="http://www.apache.org" title="The Apache Software Foundation" class="externalLink">The
Apache Software Foundation</a>
+						</li>
+						<li >
+							<a href="http://www.apache.org/foundation/sponsorship.html" title="Sponsorship"
class="externalLink">Sponsorship</a>
+						</li>
+						<li >
+							<a href="http://www.apache.org/foundation/thanks.html" title="Thanks" class="externalLink">Thanks</a>
+						</li>
+					</ul>
+				</div>
+				<div class="span3 bottom-nav">
+					<ul class="nav nav-list">
+						<li class="nav-header">Project Documentation</li>
+						<li >
+							<a href="../../project-info.html" title="Project Information">Project Information
<i class="icon-chevron-right"></i></a>
+						</li>
+					</ul>
+				</div>
+				<div class="span3 bottom-description">
+					<blockquote>Powered by Apache Karaf</blockquote>
+				</div>
+			</div>
+		</div>
+	</footer>
+
+	<div class="container subfooter">
+		<div class="row">
+			<div class="span12">
+				<p class="pull-right"><a href="#">Back to top</a></p>
+				<p class="copyright">Copyright &copy;2014-2018 <a href="http://www.apache.org">Apache
Software Foundation</a>. All Rights Reserved.</p>
+				<p><a href="http://github.com/andriusvelykis/reflow-maven-skin" title="Reflow
Maven skin">Reflow Maven skin</a> by <a href="http://andrius.velykis.lt" target="_blank"
title="Andrius Velykis">Andrius Velykis</a>.</p>
+			</div>
+		</div>
+	</div>
+
+	<!-- Le javascript
+	================================================== -->
+	<!-- Placed at the end of the document so the pages load faster -->
+	<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
+
+	<script src="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
+	<script src="../..//js/lightbox.min.js"></script>
+	<script src="../..//js/reflow-scroll.js"></script>
+	<script src="http://yandex.st/highlightjs/7.5/highlight.min.js"></script>
+
+	<script src="../..//js/reflow-skin.js"></script>
+
+	</body>
+</html>
\ No newline at end of file



Mime
View raw message