## EGDataOAuth2Authorizer

EGDataOAuth2Authorizer

## Functions

gboolean | e_gdata_oauth2_authorizer_supported ()
EGDataOAuth2Authorizer * | e_gdata_oauth2_authorizer_new ()
ESource * | e_gdata_oauth2_authorizer_ref_source ()
GType | e_gdata_oauth2_authorizer_get_service_type ()
void | e_gdata_oauth2_authorizer_set_credentials ()
ENamedParameters * | e_gdata_oauth2_authorizer_clone_credentials ()
gboolean | e_gdata_oauth2_authorizer_is_expired ()

## Object Hierarchy

        GObject
        ╰── EGDataOAuth2Authorizer

## Description

## Functions

### e_gdata_oauth2_authorizer_supported ()

    gboolean
    e_gdata_oauth2_authorizer_supported (void);

#### Returns

Whether the EGDataOAuth2Authorizer is supported, which means whether evolution-data-server had been compiled with libgdata.

Since: 3.28

### e_gdata_oauth2_authorizer_new ()

    EGDataOAuth2Authorizer *
    e_gdata_oauth2_authorizer_new (ESource *source,
                                   GType service_type);

Creates a new EGDataOAuth2Authorizer for the given `source` and `service_type` . The function always returns `NULL` when `e_gdata_oauth2_authorizer_supported()` returns `FALSE`.

#### Parameters

source | an ESource |
service_type | a GDataService type descendant |

#### Returns

a new EGDataOAuth2Authorizer, or `NULL` when the EGDataOAuth2Authorizer is not supported.

[transfer full][nullable]

Since: 3.28

### e_gdata_oauth2_authorizer_ref_source ()

    ESource *
    e_gdata_oauth2_authorizer_ref_source (EGDataOAuth2Authorizer *oauth2_authorizer);

#### Parameters

oauth2_authorizer | an EGDataOAuth2Authorizer |

#### Returns

an ESource, for which the `oauth2_authorizer` had been created, or `NULL`. Free returned non-NULL object with `g_object_unref()`, when done with it.

See: `e_gdata_oauth2_authorizer_supported()`.

[transfer full][nullable]

Since: 3.28

### e_gdata_oauth2_authorizer_get_service_type ()

    GType
    e_gdata_oauth2_authorizer_get_service_type
                                   (EGDataOAuth2Authorizer *oauth2_authorizer);

#### Parameters

oauth2_authorizer | an EGDataOAuth2Authorizer |

#### Returns

a service `GType`, for which the `oauth2_authorizer` had been created.

See: `e_gdata_oauth2_authorizer_supported()`

Since: 3.28

### e_gdata_oauth2_authorizer_set_credentials ()

    void
    e_gdata_oauth2_authorizer_set_credentials
                                   (EGDataOAuth2Authorizer *oauth2_authorizer,
                                    const ENamedParameters *credentials);

Updates internally stored credentials, used to get access token.

See: `e_gdata_oauth2_authorizer_supported()`

#### Parameters

oauth2_authorizer | an EGDataOAuth2Authorizer |
credentials | credentials to set, or `NULL`. | [nullable]

Since: 3.28

### e_gdata_oauth2_authorizer_clone_credentials ()

    ENamedParameters *
    e_gdata_oauth2_authorizer_clone_credentials
                                   (EGDataOAuth2Authorizer *oauth2_authorizer);

#### Parameters

oauth2_authorizer | an EGDataOAuth2Authorizer |

#### Returns

A copy of currently stored credentials, or `NULL`, when none are set. Free the returned structure with `e_named_parameters_free()`, when no longer needed.

See: `e_gdata_oauth2_authorizer_supported()`.

[transfer full][nullable]

Since: 3.28

### e_gdata_oauth2_authorizer_is_expired ()

    gboolean
    e_gdata_oauth2_authorizer_is_expired (EGDataOAuth2Authorizer *oauth2_authorizer);

#### Parameters

oauth2_authorizer | an EGDataOAuth2Authorizer |

#### Returns

Whether the internally stored token is expired.

See: `e_gdata_oauth2_authorizer_supported()`

Since: 3.28