[aerogear-dev] Android Push Quickstart Authentication Problems

Matthias Wessendorf matzew at apache.org
Thu Jun 20 09:09:09 EDT 2013


On Thu, Jun 20, 2013 at 3:00 PM, Daniel Passos <daniel at passos.me> wrote:

> Working in push android demo, I found 2 problems
>
> 1) We do not have a way to change the login name parameter sent to the
> server and on push the parameter name is different from what we have in api
> - I changed this in code to test it [2]
>

that's a bug on Android. See AGIOS-35. It explains what iOS will do for
1.1.0 (basically following what JS already does)

Do something similar to what you already do for the enroll:
https://github.com/aerogear/aerogear-android/blob/master/src/org/jboss/aerogear/android/authentication/AuthenticationModule.java#L50


>
> 2) The Authentication API today is only to use in Pipeline
> - I moved it to the HttpRestProvider class which is also used by the
> Pipeline [3].
>


not sure what you mean here.


>
> Summers and I worked on it yesterday night, but still could not find the
> problem.
>
> Apparently it logs in successful[y4], but when trying to register, the
> server responds: "No authentication challenges found"
>


Ah, the http basic for device registration.

Have you tried setting a header:

like:

setRequestHeader("Authorization", "Basic " + encodeBase64(user,password))




But for the demo, we are (currently) using this branch:
https://github.com/aerogear/aerogear-unified-push-server/tree/quickstart_base

Here, we have NO auth for device registration.



>
> The same authentication works perfectly in TODO but not in server push.
> This is blocking me.
>
> [1]
> http://aerogear-dev.1069024.n5.nabble.com/aerogear-dev-Push-Authentication-tt3382.html
> [2]
> https://github.com/danielpassos/aerogear-android/commit/8f867f8d4a43eb47873a5eecd708780a062620c3
> [3]
> https://github.com/danielpassos/aerogear-android/commit/4636e51a4bd2590599c01e3a01ad472434b275a7
> [4] http://cl.ly/image/2q442B0N0Q40
>
> _______________________________________________
> aerogear-dev mailing list
> aerogear-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>



-- 
Matthias Wessendorf

blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/aerogear-dev/attachments/20130620/d726ebd7/attachment-0001.html 


More information about the aerogear-dev mailing list