<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><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’t make it optimal. So I would propose to do something like this:</div><div><pre style="font-family: Consolas, 'Liberation Mono', 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 class="line-pre" style="color: rgb(0, 0, 0); font-size: 12px; font-family: Consolas, 'Liberation Mono', Courier, monospace; line-height: 16.799999237060547px; width: 744px; margin-top: 0px; margin-bottom: 0px; padding: 0px; background-color: rgb(255, 255, 255); position: static; z-index: auto;"><div class="line" id="file-proposal-js-LC1"><span class="nx">push</span><span class="p">.</span><span class="nx">register</span><span class="p">(</span><span class="kd" style="font-weight: bold;">function</span><span class="p">(</span><span class="nx">event</span><span class="p">)</span> <span class="p">{</span></div><div class="line" id="file-proposal-js-LC2"> <span class="nx">alert</span><span class="p">(</span><span class="nx">event</span><span class="p">.</span><span class="nx">alert</span><span class="p">);</span></div><div class="line" id="file-proposal-js-LC3"><span class="p">},</span> </div><div class="line" id="file-proposal-js-LC4"><span class="kd" style="font-weight: bold;">function</span><span class="p">(</span><span class="nx">error</span><span class="p">)</span> <span class="p">{</span></div><div class="line" id="file-proposal-js-LC5"> <span class="k" style="font-weight: bold;">throw</span> <span class="nx">error</span><span class="p">;</span></div><div class="line" id="file-proposal-js-LC6"><span class="p">},</span> <span class="p">{</span></div><div class="line" id="file-proposal-js-LC7"> <span class="nx">pushServerURL</span><span class="o" style="font-weight: bold;">:</span> <span class="s2" style="color: rgb(221, 17, 68);">"<pushServerURL e.g http(s)//host:port/context >"</span><span class="p">,</span></div><div class="line" id="file-proposal-js-LC8"> <span class="nx">alias</span><span class="o" style="font-weight: bold;">:</span> <span class="s2" style="color: rgb(221, 17, 68);">"<alias e.g. a username or an email address optional>"</span><span class="p">,</span></div><div class="line" id="file-proposal-js-LC9"> <span class="nx">android</span><span class="o" style="font-weight: bold;">:</span> <span class="p">{</span></div><div class="line" id="file-proposal-js-LC10"> <span class="nx">senderID</span><span class="o" style="font-weight: bold;">:</span> <span class="s2" style="color: rgb(221, 17, 68);">"<senderID e.g Google Project ID only for android>"</span><span class="p">,</span></div><div class="line" id="file-proposal-js-LC11"> <span class="nx">variantID</span><span class="o" style="font-weight: bold;">:</span> <span class="s2" style="color: rgb(221, 17, 68);">"<variantID e.g. 1234456-234320>"</span><span class="p">,</span></div><div class="line" id="file-proposal-js-LC12"> <span class="nx">variantSecret</span><span class="o" style="font-weight: bold;">:</span> <span class="s2" style="color: rgb(221, 17, 68);">"<variantSecret e.g. 1234456-234320>"</span><span class="p">,</span></div><div class="line" id="file-proposal-js-LC13"> <span class="p">},</span></div><div class="line" id="file-proposal-js-LC14"> <span class="nx">ios</span><span class="o" style="font-weight: bold;">:</span> <span class="p">{</span></div><div class="line" id="file-proposal-js-LC15"> <span class="nx">variantID</span><span class="o" style="font-weight: bold;">:</span> <span class="s2" style="color: rgb(221, 17, 68);">"<variantID e.g. 1234456-234320>"</span><span class="p">,</span></div><div class="line" id="file-proposal-js-LC16"> <span class="nx">variantSecret</span><span class="o" style="font-weight: bold;">:</span> <span class="s2" style="color: rgb(221, 17, 68);">"<variantSecret e.g. 1234456-234320>"</span><span class="p">,</span></div><div class="line" id="file-proposal-js-LC17"> <span class="p">}</span></div><div class="line" id="file-proposal-js-LC18"><span class="p">});</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><br></div><div>And if you cordova app is only for one device maybe we could support this as well:</div><div><pre style="box-sizing: border-box; font-family: Consolas, 'Liberation Mono', 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 class="line-pre" style="font-family: Consolas, 'Liberation Mono', 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); position: static; z-index: auto;"><div class="line" id="file-proposal-js-LC1"><span class="nx">push</span><span class="p">.</span><span class="nx">register</span><span class="p">(</span><span class="kd" style="font-weight: bold;">function</span><span class="p">(</span><span class="nx">event</span><span class="p">)</span> <span class="p">{</span></div><div class="line" id="file-proposal-js-LC2"> <span class="nx">alert</span><span class="p">(</span><span class="nx">event</span><span class="p">.</span><span class="nx">alert</span><span class="p">);</span></div><div class="line" id="file-proposal-js-LC3"><span class="p">},</span> </div><div class="line" id="file-proposal-js-LC4"><span class="kd" style="font-weight: bold;">function</span><span class="p">(</span><span class="nx">error</span><span class="p">)</span> <span class="p">{</span></div><div class="line" id="file-proposal-js-LC5"> <span class="k" style="font-weight: bold;">throw</span> <span class="nx">error</span><span class="p">;</span></div><div class="line" id="file-proposal-js-LC6"><span class="p">},</span> <span class="p">{</span></div><div class="line" id="file-proposal-js-LC7"> <span class="nx">pushServerURL</span><span class="o" style="font-weight: bold;">:</span> <span class="s2" style="color: rgb(221, 17, 68);">"<pushServerURL e.g http(s)//host:port/context >"</span><span class="p">,</span></div><div class="line" id="file-proposal-js-LC8"> <span class="nx">alias</span><span class="o" style="font-weight: bold;">:</span> <span class="s2" style="color: rgb(221, 17, 68);">"<alias e.g. a username or an email address optional>"</span><span class="p">,</span></div><div class="line" id="file-proposal-js-LC9"> <span class="nx">senderID</span><span class="o" style="font-weight: bold;">:</span> <span class="s2" style="color: rgb(221, 17, 68);">"<senderID e.g Google Project ID only for android>"</span><span class="p">,</span></div><div class="line" id="file-proposal-js-LC10"> <span class="nx">variantID</span><span class="o" style="font-weight: bold;">:</span> <span class="s2" style="color: rgb(221, 17, 68);">"<variantID e.g. 1234456-234320>"</span><span class="p">,</span></div><div class="line" id="file-proposal-js-LC11"> <span class="nx">variantSecret</span><span class="o" style="font-weight: bold;">:</span> <span class="s2" style="color: rgb(221, 17, 68);">"<variantSecret e.g. 1234456-234320>"</span></div><div class="line" id="file-proposal-js-LC12"><span class="p">});</span></div></pre></pre><div>This will just take the variantID and secret that are on the ‘root’ level regardless of the device type, so it would only work on one. But maybe this will confuse people again.</div></div><div><br></div><div>WDYT,</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>Erik Jan</div></div><div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">
<div> </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; position: static; z-index: auto;">
<div style="word-wrap:break-word"><span style=""><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 ‘known’ 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’t need to specify it and all configuration is in one place.</div>
</span></div></blockquote><div><br></div><div>It's optional on UPS, as only really Android clients need it. And I think originally Luke just added the 'senderID' 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> </div></div></div></div></blockquote><div><br></div><div>Hmm, right it’s optional then this maybe not the greatest idea </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; position: static; z-index: auto;">
<div style="word-wrap:break-word"><span style=""><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 'deploy' 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's easy to leak that information)</div>
<div><br></div></div></div></div></blockquote><div><br></div>Right didn’t think about that, this together with the objections that Sebastien has makes this a definite no go.<br><br></div><br></div>_______________________________________________<br>aerogear-dev mailing list<br><a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>https://lists.jboss.org/mailman/listinfo/aerogear-dev</blockquote></div><br></body></html>