<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Feb 27, 2014 at 9:40 AM, Erik Jan de Wit <span dir="ltr">&lt;<a href="mailto:edewit@redhat.com" target="_blank">edewit@redhat.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>Hi,</div><div><br></div><div>I was still thinking about those 2 last points (last night while baking pancakes) it seems that we can&rsquo;t make it optimal. So I would propose to do something like this:</div>
<div><pre style="font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:13px;margin-top:15px;margin-bottom:15px;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)">
<pre style="color:rgb(0,0,0);font-size:12px;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;line-height:16.799999237060547px;width:744px;margin-top:0px;margin-bottom:0px;padding:0px;background-color:rgb(255,255,255)">
<div class=""><div><span>push</span><span>.</span><span>register</span><span>(</span><span style="font-weight:bold">function</span><span>(</span><span>event</span><span>)</span> <span>{</span></div><div>  <span>alert</span><span>(</span><span>event</span><span>.</span><span>alert</span><span>);</span></div>
<div><span>},</span> </div><div><span style="font-weight:bold">function</span><span>(</span><span>error</span><span>)</span> <span>{</span></div><div>  <span style="font-weight:bold">throw</span> <span>error</span><span>;</span></div>
<div><span>},</span> <span>{</span></div><div>    <span>pushServerURL</span><span style="font-weight:bold">:</span> <span style="color:rgb(221,17,68)">&quot;&lt;pushServerURL e.g http(s)//host:port/context &gt;&quot;</span><span>,</span></div>
</div><div>    <span>alias</span><span style="font-weight:bold">:</span> <span style="color:rgb(221,17,68)">&quot;&lt;alias e.g. a username or an email address optional&gt;&quot;</span><span>,</span></div><div>    <span>android</span><span style="font-weight:bold">:</span> <span>{</span></div>
<div class=""><div>      <span>senderID</span><span style="font-weight:bold">:</span> <span style="color:rgb(221,17,68)">&quot;&lt;senderID e.g Google Project ID only for android&gt;&quot;</span><span>,</span></div></div>
<div class=""><div>      <span>variantID</span><span style="font-weight:bold">:</span> <span style="color:rgb(221,17,68)">&quot;&lt;variantID e.g. 1234456-234320&gt;&quot;</span><span>,</span></div><div>      <span>variantSecret</span><span style="font-weight:bold">:</span> <span style="color:rgb(221,17,68)">&quot;&lt;variantSecret e.g. 1234456-234320&gt;&quot;</span><span>,</span></div>
</div><div>    <span>},</span></div><div>    <span>ios</span><span style="font-weight:bold">:</span> <span>{</span></div><div class=""><div>      <span>variantID</span><span style="font-weight:bold">:</span> <span style="color:rgb(221,17,68)">&quot;&lt;variantID e.g. 1234456-234320&gt;&quot;</span><span>,</span></div>
<div>      <span>variantSecret</span><span style="font-weight:bold">:</span> <span style="color:rgb(221,17,68)">&quot;&lt;variantSecret e.g. 1234456-234320&gt;&quot;</span><span>,</span></div><div>    <span>}</span></div>
</div><div><span>});</span></div></pre></pre><div>Instead of leaving it to the user to find some sort of way to deal with the 2 variants we supply him with a way to configure both. On iOS the plugin will use the iOS part of the config and on android the android part plus a generic part.</div>
</div></div></blockquote><div><br></div><div><br></div><div>I like that android/iOS config object!</div><div><br></div><div><br></div><div>&nbsp;</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><div><div><br></div><div>And if you cordova app is only for one device maybe we could support this as well:</div><div><pre style="font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:13px;margin-top:15px;margin-bottom:15px;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)">
<pre style="font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:12px;line-height:16.799999237060547px;width:744px;margin-top:0px;margin-bottom:0px;padding:0px;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<div class=""><div><span>push</span><span>.</span><span>register</span><span>(</span><span style="font-weight:bold">function</span><span>(</span><span>event</span><span>)</span> <span>{</span></div><div>  <span>alert</span><span>(</span><span>event</span><span>.</span><span>alert</span><span>);</span></div>
<div><span>},</span> </div><div><span style="font-weight:bold">function</span><span>(</span><span>error</span><span>)</span> <span>{</span></div><div>  <span style="font-weight:bold">throw</span> <span>error</span><span>;</span></div>
<div><span>},</span> <span>{</span></div><div>    <span>pushServerURL</span><span style="font-weight:bold">:</span> <span style="color:rgb(221,17,68)">&quot;&lt;pushServerURL e.g http(s)//host:port/context &gt;&quot;</span><span>,</span></div>
</div><div>    <span>alias</span><span style="font-weight:bold">:</span> <span style="color:rgb(221,17,68)">&quot;&lt;alias e.g. a username or an email address optional&gt;&quot;</span><span>,</span></div><div class=""><div>
    <span>senderID</span><span style="font-weight:bold">:</span> <span style="color:rgb(221,17,68)">&quot;&lt;senderID e.g Google Project ID only for android&gt;&quot;</span><span>,</span></div></div><div class=""><div>    <span>variantID</span><span style="font-weight:bold">:</span> <span style="color:rgb(221,17,68)">&quot;&lt;variantID e.g. 1234456-234320&gt;&quot;</span><span>,</span></div>
<div>    <span>variantSecret</span><span style="font-weight:bold">:</span> <span style="color:rgb(221,17,68)">&quot;&lt;variantSecret e.g. 1234456-234320&gt;&quot;</span></div></div><div><span>});</span></div></pre></pre>
<div>This will just take the variantID and secret that are on the &lsquo;root&rsquo; level regardless of the device type, so it would only work on one. But maybe this will confuse people again.</div></div></div></div></blockquote><div>
<br></div><div>perhaps :)&nbsp;</div><div>&nbsp;</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div><br></div><div>WDYT,</div><div>
<span style="white-space:pre-wrap">        </span>Erik Jan</div></div><div><br><blockquote type="cite"><div class=""><div style="word-wrap:break-word"><div><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">

<div>&nbsp;</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div style="word-wrap:break-word"><span><div>Till now all these changes can be made on the plugin, but we could take it even further. Two things that are still platform dependent the senderId and the variantID/secret. Now senderId is &lsquo;known&rsquo; by UPS so why do we need to specify it here? We could make senderId part of the response when registering a device on UPS then the client doesn&rsquo;t need to specify it and all configuration is in one place.</div>

</span></div></blockquote><div><br></div><div>It&#39;s optional on UPS, as only really Android clients need it. And I think originally Luke just added the &#39;senderID&#39; to UPS for having something handy (copy/paste usage).</div>

<div><br></div><div>So, I am not sure on that one, as that means we now have to enforce Android Variants always get the senderID attribute. Could be done, yes, but I am not sure.</div><div>&nbsp;</div></div></div></div></blockquote>
<div><br></div><div>Hmm, right it&rsquo;s optional then this maybe not the greatest idea&nbsp;</div><br><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<div style="word-wrap:break-word"><span><div><br></div><div>That leaves variantID/secret and that is the boldest proposal. How about we make it possible to register for an application instead for a specific variant? Then based on the meta information (deviceType, operatingSystem and osVersion) we choose the right variant.</div>

</span></div></blockquote><div><br></div><div>-1</div><div><br></div><div>we should never &#39;deploy&#39; the masterSecret and the applicationID on clients. If that information is stolen (easy on devices), you can start sending dirty assaults to ALL the devices for that application. Same w/ all the different providers like Parse, Stackmob etc: they all use a MasterKey/Password for the actual send. And they _highly_ recommend NOT applying that to the clients (it&#39;s easy to leak that information)</div>

<div><br></div></div></div></div></blockquote><div><br></div>Right didn&rsquo;t think about that, this together with the objections that Sebastien has makes this a definite no go.<br><br></div><br></div></div><div class="">_______________________________________________<br>
aerogear-dev mailing list<br><a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a></div>
</blockquote></div><br></div><br>_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Matthias Wessendorf <br>
<br>blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>sessions: <a href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>
twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a>
</div></div>