[aerogear-dev] Android Auth branch and API

Summers Pittman supittma at redhat.com
Mon Oct 29 10:46:00 EDT 2012


>* Authenticator 


>- Why Authenticator is an interface? We need this? 
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. 


>- add receive Builder? makes more sense receive AuthenticationModule 
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. 
I feel like I had a much better reason for it on Friday, but if I can't remember I'll probably change it. 


>* RestAuthenticationModule 


>- Avoid calling the callback in doInBackground if it change something in the UI that will cause an exception. 
Great catch, can't belive I missed that. Fixed 


>- How about just letting the baseURL as mandatory? 
I like that. Fixed. 


>* Javadoc 
>- @link, @inheritDoc, ... don't need % 
Fixed 
----- Original Message -----

From: "Daniel Passos" <daniel at passos.me> 
To: "AeroGear Developer Mailing List" <aerogear-dev at lists.jboss.org> 
Sent: Monday, October 29, 2012 6:04:15 AM 
Subject: Re: [aerogear-dev] Android Auth branch and API 


Hey Summers, 


Awesome Job!!! 


My 2 cents: 



* HttpProvider 


- Awesome idea change methods to return new HeaderAndBodyMap 


* Authenticator 


- Why Authenticator is an interface? We need this? 
- add receive Builder? makes more sense receive AuthenticationModule 


* RestAuthenticationModule 


- Avoid calling the callback in doInBackground if it change something in the UI that will cause an exception. 
- How about just letting the baseURL as mandatory? 


* Javadoc 


- @link, @inheritDoc, ... don't need % 



-- 
Daniel Passos 


On Friday, October 26, 2012 at 2:12 PM, Summers Pittman wrote: 




My initial work is here: https://github.com/aerogear/aerogear-android/tree/auth 

Changes to existing classes/API: 


<blockquote>
HttpProvider now returns a class called HeaderAndBodyMap . This is a Map of the headers along with a byte array which was the body of the response. 

HttpProvider will throw a HttpException if it does not receive a 200 status 

HttpException wraps some information about the HTTP result. 


Description of current Auth Classes and Methods: 


<blockquote>
Interfaces : 

<blockquote>
Authenticator is a factory/lookup class a la Pipeline. 
</blockquote>

<blockquote>



</blockquote>

<blockquote>

AuthenticationModule is a module that manages a authenticated users credentials. Provides enroll , login , logout , authToken , and isAuthenticated . 
</blockquote>

<blockquote>



</blockquote>

<blockquote>

Builder is an interface that can instantiate an instance of AuthenticationModule . 
</blockquote>



Classes: 


<blockquote>

DefaultAuthenticator implements Authenticator 
</blockquote>

<blockquote>



</blockquote>

<blockquote>

RestAuthenticationModule implements AuthenticationModule only login is implemented. 
</blockquote>

</blockquote>



<blockquote>


</blockquote>

Todo: 


<blockquote>
Implement the rest of the methods in RestAuthenticationModule 
</blockquote>



<blockquote>

Update Pipe implementations to use the AuthenticationModules 




</blockquote>

<blockquote>


</blockquote>

<blockquote>


</blockquote>


_______________________________________________ 
aerogear-dev mailing list 
aerogear-dev at lists.jboss.org 
https://lists.jboss.org/mailman/listinfo/aerogear-dev 
</blockquote>



_______________________________________________ 
aerogear-dev mailing list 
aerogear-dev at lists.jboss.org 
https://lists.jboss.org/mailman/listinfo/aerogear-dev 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/aerogear-dev/attachments/20121029/534277e5/attachment-0001.html 


More information about the aerogear-dev mailing list