## GFBGraphAuthorizer GFBGraphAuthorizer — Facebook Graph API authorization interface. |

## Functions

void | gfbgraph_authorizer_process_call ()
void | gfbgraph_authorizer_process_message ()
gboolean | gfbgraph_authorizer_refresh_authorization ()

## Types and Values

struct | GFBGraphAuthorizerInterface

## Includes

    #include <gfbgraph/gfbgraph.h>

## Description

GFBGraphAuthorizer interface provides a uniform way to implement authentication and authorization process for use by GFBGraph functions.

## Functions

### gfbgraph_authorizer_process_call ()

    void
    gfbgraph_authorizer_process_call (GFBGraphAuthorizer *iface,
                                      RestProxyCall *call);

Adds the necessary authorization to `call` .

This method modifies `call` in place and is thread safe.

#### Parameters

iface | A GFBGraphAuthorizer. |
call | A RestProxyCall. |

### gfbgraph_authorizer_process_message ()

    void
    gfbgraph_authorizer_process_message (GFBGraphAuthorizer *iface,
                                         SoupMessage *message);

Adds the necessary authorization to `message` . The type of `message` can be DELETE, GET and POST.

This method modifies `message` in place and is thread safe.

#### Parameters

iface | A GFBGraphAuthorizer. |
message | A SoupMessage. |

### gfbgraph_authorizer_refresh_authorization ()

    gboolean
    gfbgraph_authorizer_refresh_authorization
                                   (GFBGraphAuthorizer *iface,
                                    GCancellable *cancellable,
                                    GError **error);

Synchronously forces `iface` to refresh any authorization tokens held by it.

This method is thread safe.

#### Parameters

iface | A GFBGraphAuthorizer. |
cancellable | An optional GCancellable object, or `NULL`. | [allow-none]
error | An optional GError, or `NULL`. | [allow-none]

#### Returns

`TRUE` if the authorizer now has a valid token.

## Types and Values

### struct GFBGraphAuthorizerInterface

    struct GFBGraphAuthorizerInterface {
            GTypeInterface parent;

            void        (*process_call)          (GFBGraphAuthorizer *iface,
                                                  RestProxyCall *call);
            void        (*process_message)       (GFBGraphAuthorizer *iface,
                                                  SoupMessage *message);
            gboolean    (*refresh_authorization) (GFBGraphAuthorizer *iface,
                                                  GCancellable *cancellable,
                                                  GError **error);
    };

Interface structure for GFBGraphAuthorizer. All methos should be thread safe.

#### Members

GTypeInterface `parent`; | The parent interface. |
`process_call` () | A method to append authorization headers to a a RestProxyCall. |
`process_message` () | A method to append authorization headers to a SoupMessage. |
`refresh_authorization` () | A synchronous method to force a refresh of any authorization tokes held by the authorizer. It should return `TRUE` on succes. |