GDataGoaAuthorizer: GData Reference Manual

## GDataGoaAuthorizer GDataGoaAuthorizer — GData GOA authorization interface |

## Stability Level

Stable, unless otherwise indicated

## Functions

GDataGoaAuthorizer * | gdata_goa_authorizer_new ()
GoaObject * | gdata_goa_authorizer_get_goa_object ()

## Properties

GoaObject * | goa-object | Read / Write / Construct Only

## Types and Values

| GDataGoaAuthorizer
| GDataGoaAuthorizerClass

## Object Hierarchy

        GObject
        ╰── GDataGoaAuthorizer

## Implemented Interfaces

GDataGoaAuthorizer implements GDataAuthorizer.

## Includes

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

## 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);

## Functions

### 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` .

#### Parameters

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”.

#### Parameters

self | a GDataGoaAuthorizer |

#### Returns

the GOA account providing authentication.

[transfer none]

Since: 0.13.1

## Types and Values

### 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

## Property Details

### The `“goa-object”` property

      “goa-object”               GoaObject *

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

Flags: Read / Write / Construct Only

Since: 0.13.1