<div dir="ltr"><p style="margin-right:0px;margin-bottom:15px;margin-left:0px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:15.199999809265137px;line-height:20.399999618530273px;margin-top:0px!important">
Hi all,</p><p style="margin:15px 0px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:15.199999809265137px;line-height:20.399999618530273px">As we are almost done with the HelloWorlds, I think we can we start on the Quickstart clients. As a reminder, the Quickstart will consist in a simple Contact CRUD application with the possibility to send a Push Notification to one of the listed contacts. Please refer to this <a href="https://issues.jboss.org/browse/AGPUSH-604" rel="noreferrer" style="color:rgb(65,131,196);text-decoration:none">JIRA</a> to have more information.</p>
<p style="margin:15px 0px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:15.199999809265137px;line-height:20.399999618530273px">The clients will have to communicate against secured REST endpoints. Joshua and Pedro have started to work on that but nothing official is released yet. I&#39;ve tried out their <a href="https://github.com/pedroigor/jboss-wfk-quickstarts/tree/PLINK-392/contacts-mobile-basic" rel="noreferrer" style="color:rgb(65,131,196);text-decoration:none">branch</a> and IMHO it&#39;s good enough to start using it for building our clients, the restpoints won&#39;t change that much I believe.</p>
<p style="margin:15px 0px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:15.199999809265137px;line-height:20.399999618530273px">And because I love you, I deployed on OpenShift a version of this secured backend to ease the development of the clients !</p>
<p style="margin:15px 0px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:15.199999809265137px;line-height:20.399999618530273px">If you browse to <a href="http://contacts-sblanc.rhcloud.com/" rel="noreferrer" style="color:rgb(65,131,196);text-decoration:none">http://contacts-sblanc.rhcloud.com/</a> you will even see the mobile web client. This deployed version contains also the Push Message endpoint.</p>
<p style="margin:15px 0px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:15.199999809265137px;line-height:20.399999618530273px">The branch of this deployed version can be found <a href="https://github.com/sebastienblanc/jboss-wfk-quickstarts/tree/push_and_secured" rel="noreferrer" style="color:rgb(65,131,196);text-decoration:none">here</a>.</p>
<p style="margin:15px 0px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:15.199999809265137px;line-height:20.399999618530273px">But let&#39;s take a look at the diffrent REST endpoints :</p>
<h2 style="font-size:2em;margin:1em 0px 15px;line-height:1.7;padding:0px;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(238,238,238);color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif">
<a name="user-content-crud-operations" class="" href="https://gist.github.com/sebastienblanc/10966803#crud-operations" rel="noreferrer" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-right:6px;padding-left:30px"></a>CRUD operations</h2>
<p style="margin:15px 0px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:15.199999809265137px;line-height:20.399999618530273px">I won&#39;t detail them here, since there is already a doc for that : <a href="https://github.com/jboss-developer/jboss-wfk-quickstarts/blob/2.6.x-develop/contacts-mobile-basic/SERVICES.md" rel="noreferrer" style="color:rgb(65,131,196);text-decoration:none">https://github.com/jboss-developer/jboss-wfk-quickstarts/blob/2.6.x-develop/contacts-mobile-basic/SERVICES.md</a></p>
<h2 style="font-size:2em;margin:1em 0px 15px;line-height:1.7;padding:0px;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(238,238,238);color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif">
<a name="user-content-security" class="" href="https://gist.github.com/sebastienblanc/10966803#security" rel="noreferrer" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-right:6px;padding-left:30px"></a>Security</h2>
<p style="margin:15px 0px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:15.199999809265137px;line-height:20.399999618530273px"><strong style>DISCLAIMER</strong> : These might change</p>
<h2 style="font-size:2em;margin:1em 0px 15px;line-height:1.7;padding:0px;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(238,238,238);color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif">
<a name="user-content-register" class="" href="https://gist.github.com/sebastienblanc/10966803#register" rel="noreferrer" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-right:6px;padding-left:30px"></a>REGISTER</h2>
<h3 style="font-size:1.5em;margin:1em 0px 15px;line-height:1.7;padding:0px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif"><a name="user-content-register-a-new-user" class="" href="https://gist.github.com/sebastienblanc/10966803#register-a-new-user" rel="noreferrer" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-right:6px;padding-left:30px"></a>register a new user</h3>
<h4 style="font-size:1.2em;margin:1em 0px 15px;line-height:1.7;padding:0px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif"><a name="user-content-restsecurityregistration" class="" href="https://gist.github.com/sebastienblanc/10966803#restsecurityregistration" rel="noreferrer" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-right:6px;padding-left:30px"></a>/rest/security/registration</h4>
<ul style="margin:15px 0px;padding:0px 0px 0px 30px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:15.199999809265137px;line-height:20.399999618530273px"><li style>Request type: POST</li>
<li style>Request type: JSON</li><li style>Return type: JSON</li><li style>Request example:</li></ul><pre style="margin-top:15px;margin-bottom:15px;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:13px;background-color:rgb(248,248,248);border:1px solid rgb(221,221,221);line-height:19px;overflow:auto;padding:6px 10px;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;word-wrap:normal;color:rgb(51,51,51)">
<code style="font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:12px;margin:0px;border:none;background-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;display:inline;vertical-align:middle;line-height:inherit;padding:0px;word-wrap:normal">
curl -v -b cookies.txt -c cookies.txt -H &quot;Accept: application/json&quot; -H &quot;Content-type: application/json&quot; -X POST -d &#39;{&quot;firstName&quot;:&quot;Jaime&quot;,&quot;lastName&quot;:&quot;Lannister&quot;,&quot;userName&quot;:&quot;<a href="mailto:jaime.lannister@westerlands.com">jaime.lannister@westerlands.com</a>&quot;,&quot;password&quot;:&quot;hearmeroar&quot;}&#39; <a href="http://contacts-sblanc.rhcloud.com/rest/security/registration">http://contacts-sblanc.rhcloud.com/rest/security/registration</a>

</code></pre><p style="margin:15px 0px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:15.199999809265137px;line-height:20.399999618530273px"><strong style>NOTE</strong> : We should use the convention to use the <em style>email</em> as userName</p>
<h2 style="font-size:2em;margin:1em 0px 15px;line-height:1.7;padding:0px;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(238,238,238);color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif">
<a name="user-content-getlogin" class="" href="https://gist.github.com/sebastienblanc/10966803#getlogin" rel="noreferrer" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-right:6px;padding-left:30px"></a>GET/LOGIN</h2>
<h3 style="font-size:1.5em;margin:1em 0px 15px;line-height:1.7;padding:0px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif"><a name="user-content-rerieve-a-user-and-log-him-in" class="" href="https://gist.github.com/sebastienblanc/10966803#rerieve-a-user-and-log-him-in" rel="noreferrer" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-right:6px;padding-left:30px"></a>Rerieve a user and log him in</h3>
<h4 style="font-size:1.2em;margin:1em 0px 15px;line-height:1.7;padding:0px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif"><a name="user-content-restsecurityuserinfo" class="" href="https://gist.github.com/sebastienblanc/10966803#restsecurityuserinfo" rel="noreferrer" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-right:6px;padding-left:30px"></a>/rest/security/user/info</h4>
<ul style="margin:15px 0px;padding:0px 0px 0px 30px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:15.199999809265137px;line-height:20.399999618530273px"><li style>Request type: GET</li>
<li style>Request type: JSON</li><li style>Auth : Basic Auth</li><li style>Return type: JSON</li><li style>Request example:</li></ul><pre style="margin-top:15px;margin-bottom:15px;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:13px;background-color:rgb(248,248,248);border:1px solid rgb(221,221,221);line-height:19px;overflow:auto;padding:6px 10px;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;word-wrap:normal;color:rgb(51,51,51)">
<code style="font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:12px;margin:0px;border:none;background-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;display:inline;vertical-align:middle;line-height:inherit;padding:0px;word-wrap:normal">
curl -v -b cookies.txt -c cookies.txt -u &quot;jaime.lannister@westerlands.com:hearmeroar&quot; -H &quot;Accept: application/json&quot; -H &quot;Content-type: application/json&quot; -X GET <a href="http://contacts-sblanc.rhcloud.com/rest/security/user/info">http://contacts-sblanc.rhcloud.com/rest/security/user/info</a> 

</code></pre><h2 style="font-size:2em;margin:1em 0px 15px;line-height:1.7;padding:0px;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(238,238,238);color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif">
<a name="user-content-logout" class="" href="https://gist.github.com/sebastienblanc/10966803#logout" rel="noreferrer" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-right:6px;padding-left:30px"></a>LOGOUT</h2>
<h3 style="font-size:1.5em;margin:1em 0px 15px;line-height:1.7;padding:0px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif"><a name="user-content-logout-a-user" class="" href="https://gist.github.com/sebastienblanc/10966803#logout-a-user" rel="noreferrer" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-right:6px;padding-left:30px"></a>Logout a user</h3>
<h4 style="font-size:1.2em;margin:1em 0px 15px;line-height:1.7;padding:0px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif"><a name="user-content-restsecurityuserinfo-1" class="" href="https://gist.github.com/sebastienblanc/10966803#restsecurityuserinfo-1" rel="noreferrer" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-right:6px;padding-left:30px"></a>/rest/security/user/info</h4>
<ul style="margin:15px 0px;padding:0px 0px 0px 30px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:15.199999809265137px;line-height:20.399999618530273px"><li style>Request type: POST</li>
<li style>Request type: JSON</li><li style>Return type: JSON</li><li style>Request example:</li></ul><pre style="margin-top:15px;margin-bottom:15px;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:13px;background-color:rgb(248,248,248);border:1px solid rgb(221,221,221);line-height:19px;overflow:auto;padding:6px 10px;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;word-wrap:normal;color:rgb(51,51,51)">
<code style="font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:12px;margin:0px;border:none;background-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;display:inline;vertical-align:middle;line-height:inherit;padding:0px;word-wrap:normal">
curl -v -b cookies.txt -c cookies.txt -H &quot;Accept: application/json&quot; -H &quot;Content-type: application/json&quot; -X POST <a href="http://contacts-sblanc.rhcloud.com/rest/security/logout">http://contacts-sblanc.rhcloud.com/rest/security/logout</a> 

</code></pre><h2 style="font-size:2em;margin:1em 0px 15px;line-height:1.7;padding:0px;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(238,238,238);color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif">
<a name="user-content-push-rest-endpoint" class="" href="https://gist.github.com/sebastienblanc/10966803#push-rest-endpoint" rel="noreferrer" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-right:6px;padding-left:30px"></a>Push Rest Endpoint</h2>
<p style="margin:15px 0px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:15.199999809265137px;line-height:20.399999618530273px">I&#39;ve added a new endpoint to push a message. In the deployed version, it&#39;s hardcoded for now to send to the &quot;quickstart&quot; application created for the <a href="https://quickstartsups-sblanc.rhcloud.com/" rel="noreferrer" style="color:rgb(65,131,196);text-decoration:none">https://quickstartsups-sblanc.rhcloud.com/</a> UPS instance, you will also have to create the appropriate variants.</p>
<h3 style="font-size:1.5em;margin:1em 0px 15px;line-height:1.7;padding:0px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif"><a name="user-content-registration-with-the-ups-instance" class="" href="https://gist.github.com/sebastienblanc/10966803#registration-with-the-ups-instance" rel="noreferrer" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-right:6px;padding-left:30px"></a>Registration with the UPS instance</h3>
<p style="margin:15px 0px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:15.199999809265137px;line-height:20.399999618530273px">I think the good flow would be to register with UPS once the login was successfull. As <em style>alias</em> the <em style>email</em>should be passed</p>
<h3 style="font-size:1.5em;margin:1em 0px 15px;line-height:1.7;padding:0px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif"><a name="user-content-endpoint" class="" href="https://gist.github.com/sebastienblanc/10966803#endpoint" rel="noreferrer" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-right:6px;padding-left:30px"></a>Endpoint</h3>
<h4 style="font-size:1.2em;margin:1em 0px 15px;line-height:1.7;padding:0px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif"><a name="user-content-restcontactssendmessage" class="" href="https://gist.github.com/sebastienblanc/10966803#restcontactssendmessage" rel="noreferrer" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-right:6px;padding-left:30px"></a>/rest/contacts/sendMessage</h4>
<ul style="margin:15px 0px;padding:0px 0px 0px 30px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:15.199999809265137px;line-height:20.399999618530273px"><li style>Request type: POST</li>
<li style>Request type: JSON</li><li style>Return type: JSON</li><li style>Request example:</li></ul><pre style="margin-top:15px;margin-bottom:15px;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:13px;background-color:rgb(248,248,248);border:1px solid rgb(221,221,221);line-height:19px;overflow:auto;padding:6px 10px;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;word-wrap:normal;color:rgb(51,51,51)">
<code style="font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:12px;margin:0px;border:none;background-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;display:inline;vertical-align:middle;line-height:inherit;padding:0px;word-wrap:normal">
curl -v -b cookies.txt -c cookies.txt -H &quot;Accept: application/json&quot; -H &quot;Content-type: application/json&quot; -X POST -d &#39;{&quot;author&quot;:&quot;Jaime&quot;,&quot;receiver&quot;:&quot;<span style="background-color:transparent;line-height:inherit"><a href="mailto:john.snow@thenorth.com">john.snow@thenorth.com</a></span><span style="background-color:transparent;line-height:inherit">&quot;,&quot;message&quot;:&quot;Winter is coming !&quot;}&#39; <a href="http://contacts-sblanc.rhcloud.com/rest/contacts/sendMessage">http://contacts-sblanc.rhcloud.com/rest/contacts/sendMessage</a></span><br>

</code></pre><p style="margin:15px 0px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:15.199999809265137px;line-height:20.399999618530273px">So here we can see that we pass data like :</p>
<pre style="margin-top:15px;margin-bottom:15px;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:13px;background-color:rgb(248,248,248);border:1px solid rgb(221,221,221);line-height:19px;overflow:auto;padding:6px 10px;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;word-wrap:normal;color:rgb(51,51,51)">
<code style="font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:12px;margin:0px;border:none;background-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;display:inline;vertical-align:middle;line-height:inherit;padding:0px;word-wrap:normal">
{
  &quot;author&quot;:&quot;<a href="mailto:jaime.lannister@westerlands.com">jaime.lannister@westerlands.com</a>&quot;,
  &quot;receiver&quot;:&quot;<a href="mailto:john.snow@thenorth.com">john.snow@thenorth.com</a>&quot;,
  &quot;message&quot;:&quot;Winter is coming !&quot;
}

</code></pre><p style="margin:15px 0px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:15.199999809265137px;line-height:20.399999618530273px">To keep it simple, the client should always pass a hardcoded value for the <code style="font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:12px;margin:0px;border:1px solid rgb(221,221,221);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;max-width:100%;display:inline-block;overflow:auto;vertical-align:middle;line-height:1.3;padding:0px;white-space:nowrap">message</code> , we don&#39;t want (for now)to add any complexity to the clients by adding an extra dialog to enter custom messages.</p>
<p style="margin:15px 0px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:15.199999809265137px;line-height:20.399999618530273px"><code style="font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:12px;margin:0px;border:1px solid rgb(221,221,221);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;max-width:100%;display:inline-block;overflow:auto;vertical-align:middle;line-height:1.3;padding:0px;white-space:nowrap">author</code> and <code style="font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:12px;margin:0px;border:1px solid rgb(221,221,221);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;max-width:100%;display:inline-block;overflow:auto;vertical-align:middle;line-height:1.3;padding:0px;white-space:nowrap">receiver</code> should contain the emails as we used that for the <code style="font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:12px;margin:0px;border:1px solid rgb(221,221,221);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;max-width:100%;display:inline-block;overflow:auto;vertical-align:middle;line-height:1.3;padding:0px;white-space:nowrap">alias</code> in UPS.</p>
<p style="margin:15px 0px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:15.199999809265137px;line-height:20.399999618530273px">So, I hope all this will help to boostrap the client&#39;s work. Remarks, questions ?</p>
<p style="margin:15px 0px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:15.199999809265137px;line-height:20.399999618530273px">(the content of this email is available <a href="https://gist.github.com/sebastienblanc/10966803" rel="noreferrer" style="color:rgb(65,131,196);text-decoration:none">here</a> )</p>
<p style="margin:15px 0px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:15.199999809265137px;line-height:20.399999618530273px">Sebi</p><p style="margin:15px 0px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:15.199999809265137px;line-height:20.399999618530273px">
<br></p><p style="margin:15px 0px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:15.199999809265137px;line-height:20.399999618530273px"><br></p></div>