|GoaObject *||goa-object||Read / Write / Construct Only|
GObject ╰── GDataGoaAuthorizer
GDataGoaAuthorizer implements GDataAuthorizer.
GDataGoaAuthorizer provides an implementation of the GDataAuthorizer interface for authentication and authorization using GNOME Online Accounts (GOA) over D-Bus. This allows a single login session (managed by the GOA daemon) to be used by multiple applications simultaneously, without each of those applications having to go through the authentication process themselves. Applications making use of GDataGoaAuthorizer don't get access to the user's password (it's handled solely by the GOA daemon).
Internally, GOA authenticates with the Google servers using theOAuth 1.0 or OAuth 2.0 processes.
GDataGoaAuthorizer natively supports authorization against multiple services (unlike GDataClientLoginAuthorizer), depending entirely on which services the user has enabled for their Google account in GOA. GDataGoaAuthorizer cannot authenticate for more services than are enabled in GOA.
Example 7. Authenticating Using GOA
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
GDataSomeService *service; GoaObject *goa_object; GDataGoaAuthorizer *authorizer; /* Create an authorizer and pass it an existing #GoaObject. */ goa_object = get_goa_object (); authorizer = gdata_goa_authorizer_new (goa_object); /* Create a service object and link it with the authorizer */ service = gdata_some_service_new (GDATA_AUTHORIZER (authorizer)); /* Use the service! */ g_object_unref (service); g_object_unref (authorizer); g_object_unref (goa_object);
GDataGoaAuthorizer * gdata_goa_authorizer_new (
Create a new GDataGoaAuthorizer using the authentication token from the given
GoaObject * gdata_goa_authorizer_get_goa_object (
The GOA account providing authentication. This is the same as “goa-object”.
typedef struct _GDataGoaAuthorizer GDataGoaAuthorizer;
All the fields in the GDataGoaAuthorizer structure are private and should never be accessed directly.
“goa-object” GoaObject *
The GOA account providing authentication. This should have all the necessary services enabled on it.
Flags: Read / Write / Construct Only