<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: times new roman,new york,times,serif; font-size: 12pt; color: #000000'><div style="font-family: Helvetica, Arial, sans-serif; "><font size="2">>* Authenticator</font></div><div style="font-family: Helvetica, Arial, sans-serif; "><font size="2"><br></font></div><div style="font-family: Helvetica, Arial, sans-serif; "><font size="2">>- Why Authenticator is an interface? We need this?</font></div><div style="font-family: Helvetica, Arial, sans-serif; "><font size="4">It makes mocking for testing much easier for starters. Also if we decide to make DefaultAuthenticator final it doesn't break developers who may want to create their own implementations. Also it makes it work better with DI frameworks, proxying etc. </font></div><div style="font-family: Helvetica, Arial, sans-serif; "><font size="2"><br></font></div><div style="font-family: Helvetica, Arial, sans-serif; "><font size="2">>- add receive Builder? makes more sense receive AuthenticationModule</font></div><div style="font-family: Helvetica, Arial, sans-serif; "><font size="4">It does and it doesn't. I based DefaultAuthenticator in part on the goals of Pipeline which include being a factory. Since I didn't want tons of overloaded .add methods, passing in the Builder makes the most sense.</font></div><div style="font-family: Helvetica, Arial, sans-serif; "><font size="4">I feel like I had a much better reason for it on Friday, but if I can't remember I'll probably change it.</font></div><div style="font-family: Helvetica, Arial, sans-serif; "><font size="2"><br></font></div><div style="font-family: Helvetica, Arial, sans-serif; "><font size="2">>* RestAuthenticationModule</font></div><div style="font-family: Helvetica, Arial, sans-serif; "><font size="2"><br></font></div><div style="font-family: Helvetica, Arial, sans-serif; "><font size="2">>- Avoid calling the callback in doInBackground if it change something in the UI that will cause an exception. </font></div><div style="font-family: Helvetica, Arial, sans-serif; "><font size="4">Great catch, can't belive I missed that. Fixed</font></div><div style="font-family: Helvetica, Arial, sans-serif; "><font size="4"><br></font></div><div style="font-family: Helvetica, Arial, sans-serif; "><font size="2">>- How about just letting the baseURL as mandatory?</font></div><div style="font-family: Helvetica, Arial, sans-serif; "><font size="4">I like that. Fixed.</font></div><div style="font-family: Helvetica, Arial, sans-serif; "><font size="4"><br></font></div><div style="font-family: Helvetica, Arial, sans-serif; "><font size="2">>* Javadoc </font></div><div style="font-family: Helvetica, Arial, sans-serif; "><font size="2">>- @link, @inheritDoc, ... don't need %</font></div><div style="font-family: Helvetica, Arial, sans-serif; "><font size="4">Fixed</font></div><br><hr id="zwchr" style="font-size: 12pt; "><div style="font-size: 12pt; color: rgb(0, 0, 0); font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica, Arial, sans-serif; "><b>From: </b>"Daniel Passos" <daniel@passos.me><br><b>To: </b>"AeroGear Developer Mailing List" <aerogear-dev@lists.jboss.org><br><b>Sent: </b>Monday, October 29, 2012 6:04:15 AM<br><b>Subject: </b>Re: [aerogear-dev] Android Auth branch and API<br><br>
<div>
<span style="font-size: 12px;">Hey Summers,</span>
</div><div><span style="font-size: 12px;"><br></span></div><div><span style="font-size: 12px;">Awesome Job!!!</span></div><div><span style="font-size: 12px;"><br></span></div><div><span style="font-size: 12px;">My 2 cents:</span></div><div><span style="font-size: 12px;"><br></span></div><div><div>* HttpProvider</div><div><br></div><div>- Awesome idea change methods to return new HeaderAndBodyMap</div><div><br></div><div>* Authenticator</div><div><br></div><div>- Why Authenticator is an interface? We need this?</div><div>- add receive Builder? makes more sense receive AuthenticationModule</div><div><br></div><div>* RestAuthenticationModule</div><div><br></div><div>- Avoid calling the callback in doInBackground if it change something in the UI that will cause an exception. </div><div>- How about just letting the baseURL as mandatory?</div><div><br></div><div>* Javadoc </div><div><br></div><div>- @link, @inheritDoc, ... don't need %</div></div><div><br></div><div><div>-- </div><div>Daniel Passos</div><div><br></div></div>
<p style="color: #A0A0A8;">On Friday, October 26, 2012 at 2:12 PM, Summers Pittman wrote:</p>
<blockquote style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px;">
<span><div><div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt; color: #000000"><font face="times new roman, new york, times, serif" size="3">My initial work is here:<a href="https://github.com/aerogear/aerogear-android/tree/auth" target="_blank">https://github.com/aerogear/aerogear-android/tree/auth</a></font><br><br><b style="color: rgb(0, 0, 0); font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; ">Changes to existing classes/API:<br></b><br><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><i style="color: rgb(0, 0, 0); font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; ">HttpProvider</i><font face="times new roman, new york, times, serif" size="3"> now returns a class called </font><i style="color: rgb(0, 0, 0); font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; ">HeaderAndBodyMap</i><font face="times new roman, new york, times, serif" size="3">. This is a Map of the headers along with a byte array which was the body of the response.</font><br><i style="color: rgb(0, 0, 0); font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><br>HttpProvider</i><font face="times new roman, new york, times, serif" size="3"> will throw a </font><i style="color: rgb(0, 0, 0); font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; ">HttpException</i><font face="times new roman, new york, times, serif" size="3"> if it does not receive a 200 status</font><br><i style="color: rgb(0, 0, 0); font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><br>HttpException</i><font face="times new roman, new york, times, serif" size="3"> wraps some information about the HTTP result.</font></blockquote><br><b style="color: rgb(0, 0, 0); font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; ">Description of current Auth Classes and Methods:<br></b><br><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><b><i>Interfaces</i></b>:<br><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><i style="color: rgb(0, 0, 0); font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; ">Authenticator </i><font face="times new roman, new york, times, serif" size="3">is a factory/lookup class a la </font><i style="color: rgb(0, 0, 0); font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; ">Pipeline.</i></blockquote><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><div style="color: rgb(0, 0, 0); font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><br></div></blockquote><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><div style="color: rgb(0, 0, 0); font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><i>AuthenticationModule </i>is a module that manages a authenticated users credentials. Provides <u>enroll</u>, <u>login</u>, <u>logout</u>, <u>authToken</u>, and <u>isAuthenticated</u>.</div></blockquote><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><div style="color: rgb(0, 0, 0); font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><br></div></blockquote><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><i style="color: rgb(0, 0, 0); font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; ">Builder</i><font face="times new roman, new york, times, serif" size="3"> is an interface that can </font><font face="times new roman, new york, times, serif">instantiate</font><font face="times new roman, new york, times, serif" size="3"> an instance of </font><i style="color: rgb(0, 0, 0); font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; ">AuthenticationModule</i><font face="times new roman, new york, times, serif" size="3">.</font></div></blockquote><div><br></div><div><b><i>Classes:</i></b></div><div><b><i><br></i></b></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><i>DefaultAuthenticator </i>implements<i> Authenticator</i> </div></blockquote><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><span style="font-family: 'times new roman', 'new york', times, serif; "><br></span></div></blockquote><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><span style="font-family: 'times new roman', 'new york', times, serif; "><i>RestAuthenticationModule</i> implements <i>AuthenticationModule </i>only <u>login</u> is implemented.</span></div></blockquote></blockquote><div><b style="color: rgb(0, 0, 0); font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><br></b></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><br></blockquote><div><b style="color: rgb(0, 0, 0); font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; ">Todo:</b></div><div><b style="color: rgb(0, 0, 0); font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><br></b></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><font face="times new roman, new york, times, serif">Implement the rest of the methods in RestAuthenticationModule</font></blockquote><div><b style="color: rgb(0, 0, 0); font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><br></b></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><span style="color: rgb(0, 0, 0); font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; ">Update Pipe implementations to use the AuthenticationModules</span></div><div><span style="color: rgb(0, 0, 0); font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><br></span></div><div><br></div></blockquote><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><span style="color: rgb(0, 0, 0); font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "></span></div></blockquote><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><span style="color: rgb(0, 0, 0); font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "></span></div></blockquote></div></div><div><div>_______________________________________________</div><div>aerogear-dev mailing list</div><div><a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a></div><div><a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a></div></div></div></span>
</blockquote>
<div>
<br>
</div>
<br>_______________________________________________<br>aerogear-dev mailing list<br>aerogear-dev@lists.jboss.org<br>https://lists.jboss.org/mailman/listinfo/aerogear-dev<br></div><br></div></body></html>