diff options
author | David Zeuthen <davidz@redhat.com> | 2011-05-25 17:00:44 -0400 |
---|---|---|
committer | David Zeuthen <davidz@redhat.com> | 2011-05-25 17:00:44 -0400 |
commit | 682f2baa58bdca6c500d38f75539c16ec7e57427 (patch) | |
tree | 7ec58411c72ce328f8b3aa4f152996758b536e41 | |
parent | 09c6064b6be52c6e5171f091730db91422e6b68b (diff) |
OAuth: Add a way to get the consumer key and secret
This is needed to actually use the returned token.
Signed-off-by: David Zeuthen <davidz@redhat.com>
-rw-r--r-- | data/dbus-interfaces.xml | 6 | ||||
-rw-r--r-- | doc/goa-sections.txt | 6 | ||||
-rw-r--r-- | src/goabackend/goaoauthprovider.c | 4 |
3 files changed, 15 insertions, 1 deletions
diff --git a/data/dbus-interfaces.xml b/data/dbus-interfaces.xml index e90f1d3..02e7b99 100644 --- a/data/dbus-interfaces.xml +++ b/data/dbus-interfaces.xml @@ -247,6 +247,12 @@ <arg name="expires_in" type="i" direction="out"/> </method> + <!-- ConsumerKey: The consumer key. --> + <property name="ConsumerKey" type="s" access="read"/> + + <!-- ConsumerSecret: The consumer secret. --> + <property name="ConsumerSecret" type="s" access="read"/> + <!-- Identity: The identity that was authenticated. --> <property name="Identity" type="s" access="read"/> </interface> diff --git a/doc/goa-sections.txt b/doc/goa-sections.txt index b7836ae..12c28cb 100644 --- a/doc/goa-sections.txt +++ b/doc/goa-sections.txt @@ -400,8 +400,12 @@ goa_oauth_based_call_get_access_token goa_oauth_based_call_get_access_token_finish goa_oauth_based_call_get_access_token_sync goa_oauth_based_complete_get_access_token -goa_oauth_based_set_identity goa_oauth_based_get_identity +goa_oauth_based_set_identity +goa_oauth_based_get_consumer_key +goa_oauth_based_set_consumer_key +goa_oauth_based_get_consumer_secret +goa_oauth_based_set_consumer_secret GoaOAuthBasedProxy GoaOAuthBasedProxyClass goa_oauth_based_proxy_new diff --git a/src/goabackend/goaoauthprovider.c b/src/goabackend/goaoauthprovider.c index ab4087f..05e5fd7 100644 --- a/src/goabackend/goaoauthprovider.c +++ b/src/goabackend/goaoauthprovider.c @@ -1449,6 +1449,10 @@ goa_oauth_provider_build_object (GoaProvider *provider, goto out; oauth_based = goa_oauth_based_skeleton_new (); + goa_oauth_based_set_consumer_key (oauth_based, + goa_oauth_provider_get_consumer_key (GOA_OAUTH_PROVIDER (provider))); + goa_oauth_based_set_consumer_secret (oauth_based, + goa_oauth_provider_get_consumer_secret (GOA_OAUTH_PROVIDER (provider))); /* Ensure D-Bus method invocations run in their own thread */ g_dbus_interface_skeleton_set_flags (G_DBUS_INTERFACE_SKELETON (oauth_based), G_DBUS_INTERFACE_SKELETON_FLAGS_HANDLE_METHOD_INVOCATIONS_IN_THREAD); |