On 07/29/2013 05:06 PM, Patrick Ohly wrote:
On Mon, 2013-07-29 at 16:03 +0200, Patrick Ohly wrote:
On Mon, 2013-07-29 at 16:40 +0300, Amarnath Valluri wrote:
Yes, It worked for me :
-----------------------------
~/work/code.google.com/libgsignon-glib/examples
$ ./google-oauth2-example
--get-google-token=5
--client-id="796629365126.apps.googleusercontent.com"
--client-secret="3NbR94RM-DTnA81BWjiJe4TP"
Geting token
Got token :{'AccessToken':
<'ya29.AHES6ZS7RpdHAoikzv0ZdV-2xpPDUXMJkFCcaNpz6r3_G5k'>,
'TokenParameters': <@a{sv} {}>, 'TokenType': <'Bearer'>, 'Duration':
<int64 3596>, 'Timestamp': <int64 1375105096>, 'Scope':
<'https://www.googleapis.com/auth/calendar'>}
--------------------------

The only changes i did was - RedirctURI and Scope.
It works for me, too, when using the Evolution client id/secret. It
failed when using my own one.

Hmm, after succeeded with Evolution credentials it also started to work
with my own. <shrug>
... and after recompiling with "scope" = "email", I am back to the
"invalid_request". Can you reproduce it when switching back and forth
between different scopes while keeping everything else constant?

Where does signond keep local state?
This is bit strange, I tried both the scopes with same(evolution) client id, It worked for me :(

------------------------------------------------------------------------------------------
~/work/code.google.com/libgsignon-glib/examples$ ./google-oauth2-example --get-google-token=5 --client-id="796629365126.apps.googleusercontent.com" --client-secret="3NbR94RM-DTnA81BWjiJe4TP"
Geting token
Got token :{'AccessToken': <'ya29.AHES6ZTkWjWNYbcF1SZTfrbHchyVKkRTzrM5NAoSrOifDn_SWAzH'>, 'TokenParameters': <@a{sv} {}>, 'TokenType': <'Bearer'>, 'Duration': <int64 3600>, 'Timestamp': <int64 1375106957>, *'Scope': <'email'>*}
~/work/code.google.com/libgsignon-glib/examples$ vim google-oauth2-example.c
~/work/code.google.com/libgsignon-glib/examples$ make
gcc -std=gnu99 -DHAVE_CONFIG_H -I.. -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/gio-unix-2.0/ -g -O2 -MT google_oauth2_example-google-oauth2-example.o -MD -MP -MF .deps/google_oauth2_example-google-oauth2-example.Tpo -c -o google_oauth2_example-google-oauth2-example.o `test -f 'google-oauth2-example.c' || echo './'`google-oauth2-example.c mv -f .deps/google_oauth2_example-google-oauth2-example.Tpo .deps/google_oauth2_example-google-oauth2-example.Po /bin/bash ../libtool --tag=CC --mode=link gcc -std=gnu99 -g -O2 -o google-oauth2-example google_oauth2_example-google-oauth2-example.o -lgio-2.0 -lgobject-2.0 -lglib-2.0 ../libgsignon-glib/libgsignon-glib.la libtool: link: gcc -std=gnu99 -g -O2 -o .libs/google-oauth2-example google_oauth2_example-google-oauth2-example.o -lgio-2.0 -lgobject-2.0 -lglib-2.0 ../libgsignon-glib/.libs/libgsignon-glib.so ~/work/code.google.com/libgsignon-glib/examples$ ./google-oauth2-example --get-google-token=5 --client-id="796629365126.apps.googleusercontent.com" --client-secret="3NbR94RM-DTnA81BWjiJe4TP"
Geting token
Got token :{'AccessToken': <'ya29.AHES6ZRrNtL1aRGkTBtzvVsmJFJxwhhtCS33wjO6xo-k2wY'>, 'TokenParameters': <@a{sv} {}>, 'TokenType': <'Bearer'>, 'Duration': <int64 3597>, 'Timestamp': <int64 1375106992>, *'Scope': <**'https://www.googleapis.com/auth/calendar*'>}
---------------------------------------------------------------

- Amarnath
---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki Business Identity Code: 0357606 - 4 Domiciled in Helsinki
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
_______________________________________________
SyncEvolution mailing list
[email protected]
https://lists.syncevolution.org/mailman/listinfo/syncevolution

Reply via email to