OAuth2 VK.com
by Денис Карпенко
Hello everyone,
I am trying to add special config for VK in OAuth2 library, but I get stuck
in a rut. VK doesn't allow make redirect URI without ( http:// or https://)
so I can't send authorization token into application using URL schemes(
because I need use something like "applicationName://". Did anyone
encounter a similar problem ? How can I solve this problem?
P.S VK also doesn't have refresh tokens. VK begins to to irritate me :)
Denis.
9 years, 8 months
Problem sending push message
by Andreas Røsdal
Hello,
I have been running the AeroGear UnifiedPush Server for some months now,
and it has worked quite nicely for a while. However, recently the push
messages have not been delivered from the UnifiedPush server to the iOS
devices which are registered with it.
I have attached some relevant parts of the log where two push messages have
not been sent correctly:
http://www.pvv.ntnu.no/~andrearo/wildfly-log-utdrag.txt
UnifiedPush Server version 1.0.2, WildFly version 8.1.0.
Thanks in advance for helping resolve this issue!
Regards,
Andreas R.
9 years, 8 months
Re: [aerogear-dev] I need your help)
by Corinne Krych
I guess you meant: "why do we need authorisation code and not go for access
token right from start?"
What you're asking for is what is the difference between implicit grant and
authorization grant.
See authorization code grant flow:
http://tools.ietf.org/html/rfc6749#section-4.1
See implicit grant:
http://tools.ietf.org/html/rfc6749#section-4.2
On natives app we work with authorization code grant because: natives app
are capable of keeping a secret from end-user which is not the case for
web-browser app ;)
- no trolling -
As you can see in the spec diagram the authorization code is provided by a
user-agent (through external browser or webview), the code is temporary (10
min for facebook for ex.). whereas the access token comes from authz server
directly. Tokens live longer (1 or 2 hours life time) and even more for
refresh token (sometime with or without expiration).
As you pointed it: there are differences in implementation depending on
providers. For ex, Facebook does not have refresh token but have the concep
of short-lived long-lived token.
++
Corinne
PS: Always reply to mail-list so that others can follow the discussion.
Your questions are interesting and may help others dev :)
On 17 March 2015 at 16:35, Денис Карпенко <banddk1(a)gmail.com> wrote:
> Oh yes, I've forgotten about public, thank you )
> OK, I hope my code will start to work soon )
> I asked question in mailing list but nobody answered me (
> Why do we get access code ? I can change response type on token, and vk
> sends token to application. Facebook doesn't send token without code,
> doesn't it?
>
> Denis.
>
> 2015-03-17 18:07 GMT+03:00 Corinne Krych <corinnekrych(a)gmail.com>:
>
>> The reason is because extractCode:completionHandler: defined in
>> OAuth2Module is not public.
>> So far this method didn't need any override from current provider so it
>> was internal.
>>
>> Make it public and you'll be able to override it. Once you've got some
>> working code we can discuss API.
>>
>> ++
>> Corinne
>>
>> On 17 March 2015 at 15:58, Денис Карпенко <banddk1(a)gmail.com> wrote:
>>
>>> 6.1.1
>>>
>>> 2015-03-17 16:37 GMT+03:00 Corinne Krych <corinnekrych(a)gmail.com>:
>>>
>>>> Which xcode are you on?
>>>> 6.1.1? 6.2 or latest 6.3beta?
>>>>
>>>> ++
>>>> Corinne
>>>> > On 17 Mar 2015, at 14:10, Денис Карпенко <banddk1(a)gmail.com> wrote:
>>>> >
>>>> > Hello!
>>>> > Look at the screenshoot please ) Why doesn't Xcode see methods of
>>>> OAuth2Module class ? I'm sure that OAuth2Module class has these methods)
>>>> > I suppose, it is associated with Pods.
>>>> > <2015-03-17 04.00.09 pm.jpg>
>>>> >
>>>> > Denis.
>>>>
>>>>
>>>
>>
>
9 years, 8 months
Re: [aerogear-dev] I need your help)
by Corinne Krych
The reason is because extractCode:completionHandler: defined in
OAuth2Module is not public.
So far this method didn't need any override from current provider so it was
internal.
Make it public and you'll be able to override it. Once you've got some
working code we can discuss API.
++
Corinne
On 17 March 2015 at 15:58, Денис Карпенко <banddk1(a)gmail.com> wrote:
> 6.1.1
>
> 2015-03-17 16:37 GMT+03:00 Corinne Krych <corinnekrych(a)gmail.com>:
>
>> Which xcode are you on?
>> 6.1.1? 6.2 or latest 6.3beta?
>>
>> ++
>> Corinne
>> > On 17 Mar 2015, at 14:10, Денис Карпенко <banddk1(a)gmail.com> wrote:
>> >
>> > Hello!
>> > Look at the screenshoot please ) Why doesn't Xcode see methods of
>> OAuth2Module class ? I'm sure that OAuth2Module class has these methods)
>> > I suppose, it is associated with Pods.
>> > <2015-03-17 04.00.09 pm.jpg>
>> >
>> > Denis.
>>
>>
>
9 years, 8 months
AeroGear usage in the DevNexus app report
by Summers Pittman
I made the DevNexus[1] app the past two years and have tried to dogfood
as much of the Android AeroGear client library as I could. Consider this
a field report of sorts from a experienced user's perspective.
# Server Background
The DevNexus website exposes its registration data as a series of JSON
documents. It also exposes a custom Google+ authentication endpoint
used to identify users. This was used by the app in 2014 for backing up
user's schedules but was not used in 2015. The DevNexus website itself
is a Spring MVC application and is available on github[2].
# App Background 2015
The 2015 app has custom schedules, a Google Maps view of the venue,
presentation viewing and discovery, a directory of previous years
devnexus presentations, and a podcast player with audio from previous
year's sessions. It uses the AGDroid pipe and store libraries. In 2014
it also used the auth library but the feature using it was removed. It
also uses Picasso for image management.
# AGPipe usage review
The pipe library and its GSON marshalling are very nice and very easy.
Those were generally wrapped in a android SyncAdapter and fired at
regular intervals. Pipe's callback mechanism poses some problems
however. Because Android aggressively cleans up objects the code needed
to provide a lock that waited for the callbacks to finish. Without the
lock the code might call an object which has left Android's active state
and this causes an error. Over all it is still a very good way to
handle http networking in Android.
#AGAuth usage review
The auth module was used in the 2014 application but not in the 2015
application. The code however remains and is functional. I created two
custom AuthenticationModule objects. One interacts with the Android
Account Manager system to get a session token from Google Plus. The
other attaches a cookie to http requests and handles auth failures. In
general the architecture is sound, but it is a bit of a hack to get
around the fact that last year we did not have the authz library
finished at this point which has a better architecture for this type of
behavior.
#AGStore usage review
The store library was wrapped in a content provider. In Android the
content provider API provides a abstracted way to exposed data to
activities, services, etc while having the data management and lifecycle
happen in a controlled, centralized manner. AG Store made handling
large JSON serializable objects pretty trivial and most of my issues
were around the fact that the JSON coming from the DevNexus server has
some weird architectures. Additionally, the query mechanism doesn't let
you query properties of collections of objects. This will need to be
addressed at some point.
#Things AeroGear didn't do that would have been nice
I wanted to have offline support/file management for the podcasting
system, but there isn't a easy library for doing that (which I found in
my brief time looking) and we don't have a good solution for that yet
either. Additionally wrapping the Stores in Content providers was very
labor intensive. There are many projects to automate the various
Android patterns around Content Providers which we may be able to borrow
to make this easier.
Additionally Aerogear provides nothing for the Android UI. I think that
this is out of scope for our project but it is something to keep in
mind. However there are other VERY powerful libraries which help out in
this regard.
#Conclusion
AeroGear Android doesn't suck to use and provided real value to me. I
feel like it is stable and well built especially as of 2.0. Of course
I'm biased. If we have a good offline story we will enhance what is
already a strong service and data connection to Android users.
1. https://github.com/secondsun/devnexus-android-2015
2. https://github.com/devnexus/devnexus-site
--
Summers Pittman
>>Phone:404 941 4698
>>Java is my crack.
9 years, 8 months