On 02/11/2013 10:15 AM, Kris Borchers wrote:
In
https://issues.jboss.org/browse/AEROGEAR-858, I propose a change
to
the APIs of both Pipeline and Auth when creating new pipes or auth
modules.
From a design perspective I don't really understand how inverting
the
relationship between Pipes and Auth works. Authorization/Authentication
tokens are part of the request. Pipes create/manage requests ergo they
need to know about what auth is available. Authentication doesn't care
what requests use it, it is just data.
Furthermore, looking down the road when we have OAuth, having
Authenticators be a propery on Pipes allows the Pipe to refresh tokens
as part of a read/save/etc request transparently to the user.
What this change does is change the dependency from Pipeline
depending
on Auth to only the Auth rest adapter depending on Pipeline. So what
does this get us?
1. A narrower dependency between Auth and Pipeline
But a wider dependency on Pipes from Auth. Now when an auth is created
it adds new behaviour to every instance of a pipe passed to it. This
exact behaviour can't be done in Java, so Pipe in Java will still have
the dependency on Auth.
1. Removal of AeroGear.ajax and instead build directly on top of
jQuery.ajax which in turn gives us a much smaller file size
(important for JS)
I'm not seeing how this requires Auth to be moved.
I would appreciate other thoughts on this. There are some issues with
my current PR (
https://github.com/aerogear/aerogear-js/pull/21) but I
think I have solutions so once I update that PR I would appreciate
feedback on that as well.
Thanks!
Don't thank me yet ;)
_______________________________________________
aerogear-dev mailing list
aerogear-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/aerogear-dev