GDataGoaAuthorizer

## GDataGoaAuthorizer GDataGoaAuthorizer — GData GOA authorization interface |

## Stability Level

Unstable, unless otherwise indicated

## Synopsis

    #include <gdata/gdata-goa-authorizer.h>

                        GDataGoaAuthorizer;
                        GDataGoaAuthorizerClass;
    GDataGoaAuthorizer * gdata_goa_authorizer_new           (GoaObject *goa_object);
    GoaObject *         gdata_goa_authorizer_get_goa_object (GDataGoaAuthorizer *self);

## Object Hierarchy

      GObject
       +----GDataGoaAuthorizer

## Implemented Interfaces

GDataGoaAuthorizer implements GDataAuthorizer.

## Properties

      "goa-object"               GoaObject*            : Read / Write / Construct Only

## Description

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 the OAuth 1.0 process.

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 <GTKDOCLINK HREF="GoaObject">GoaObject</GTKDOCLINK>. */
    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);

## Details

### GDataGoaAuthorizer

    typedef struct _GDataGoaAuthorizer GDataGoaAuthorizer;

All the fields in the GDataGoaAuthorizer structure are private and should never be accessed directly.

Since 0.13.1

### GDataGoaAuthorizerClass

    typedef struct {
    } GDataGoaAuthorizerClass;

All the fields in the GDataGoaAuthorizerClass structure are private and should never be accessed directly.

Since 0.13.1

### gdata_goa_authorizer_new ()

    GDataGoaAuthorizer * gdata_goa_authorizer_new           (GoaObject *goa_object);

Create a new GDataGoaAuthorizer using the authentication token from the given `goa_object`.

`goa_object` : | the GOA account providing authentication. [transfer none]
Returns : | a new GDataGoaAuthorizer; unref with `g_object_unref()`. [transfer full]

Since 0.13.1

### gdata_goa_authorizer_get_goa_object ()

    GoaObject *         gdata_goa_authorizer_get_goa_object (GDataGoaAuthorizer *self);

The GOA account providing authentication. This is the same as "goa-object".

`self` : | a GDataGoaAuthorizer
Returns : | the GOA account providing authentication. [transfer none]

Since 0.13.1

## Property Details

### The `"goa-object"` property

      "goa-object"               GoaObject*            : Read / Write / Construct Only

The GOA account providing authentication. This should have all the necessary services enabled on it.

Since 0.13.1