gfbgraph Reference Manual | ||||
---|---|---|---|---|
Top | Description |
Synopsis
#include <gfbgraph/gfbgraph.h> struct GFBGraphAuthorizerInterface; void gfbgraph_authorizer_process_call (GFBGraphAuthorizer *iface
,RestProxyCall *call
); void gfbgraph_authorizer_process_message (GFBGraphAuthorizer *iface
,SoupMessage *message
); gboolean gfbgraph_authorizer_refresh_authorization (GFBGraphAuthorizer *iface
,GCancellable *cancellable
,GError **error
);
Description
GFBGraphAuthorizer interface provides a uniform way to implement authentication and authorization process for use by GFBGraph functions.
Details
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.
GTypeInterface |
The parent interface. |
A method to append authorization headers to a a RestProxyCall. | |
A method to append authorization headers to a SoupMessage. | |
A synchronous method to force a refresh of any authorization
tokes held by the authorizer. It should return TRUE on succes. |
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.
|
A GFBGraphAuthorizer. |
|
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.
|
A GFBGraphAuthorizer. |
|
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.
|
A GFBGraphAuthorizer. |
|
An optional GCancellable object, or NULL . [allow-none]
|
|
An optional GError, or NULL . [allow-none]
|
Returns : |
TRUE if the authorizer now has a valid token. |