![]() |
![]() |
![]() |
Wocky Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
gboolean (*WockyAuthAuthDataFunc) (WockyAuthHandler *handler
,const GString *data
,GString **response
,GError **error
); struct WockyAuthHandlerIface; gboolean (*WockyAuthInitialResponseFunc) (WockyAuthHandler *handler
,GString **initial_data
,GError **error
); gboolean (*WockyAuthSuccessFunc) (WockyAuthHandler *handler
,GError **error
); gboolean wocky_auth_handler_get_initial_response (WockyAuthHandler *handler
,GString **initial_data
,GError **error
); const gchar * wocky_auth_handler_get_mechanism (WockyAuthHandler *handler
); gboolean wocky_auth_handler_handle_auth_data (WockyAuthHandler *handler
,const GString *data
,GString **response
,GError **error
); gboolean wocky_auth_handler_handle_success (WockyAuthHandler *handler
,GError **error
); gboolean wocky_auth_handler_is_plain (WockyAuthHandler *handler
);
gboolean (*WockyAuthAuthDataFunc) (WockyAuthHandler *handler
,const GString *data
,GString **response
,GError **error
);
struct WockyAuthHandlerIface { GTypeInterface parent; gchar *mechanism; gboolean plain; WockyAuthInitialResponseFunc initial_response_func; WockyAuthAuthDataFunc auth_data_func; WockyAuthSuccessFunc success_func; };
The parent interface. | |
The AUTH mechanism which this handler responds to challenges for. | |
Whether the mechanism this handler handles sends secrets in plaintext. | |
WockyAuthInitialResponseFunc |
Called when the initial <auth
/> stanza is generated |
WockyAuthAuthDataFunc |
Called when any authentication data from the server is received |
WockyAuthSuccessFunc |
Called when a <success/> stanza
is received. |
gboolean (*WockyAuthInitialResponseFunc) (WockyAuthHandler *handler
,GString **initial_data
,GError **error
);
Called when authentication begins, if the mechanism allows a
response to an implicit challenge during AUTH initiation (which, in
XMPP, corresponds to sending the <auth/>
stanza
to the server).
The function should return TRUE
on success, and optionally set the
initial_data
to a string if there is
initial data to send. On error, it should return FALSE
and set
error
.
|
a WockyAuthHandler object |
|
a GString location to fill with the initial data. [out] |
|
an optional location for a GError to fill, or NULL
|
Returns : |
TRUE on success, otherwise FALSE
|
gboolean (*WockyAuthSuccessFunc) (WockyAuthHandler *handler
,GError **error
);
Called when a <success/>
stanza is received
during authentication. If no error is returned, then authentication
is considered finished. (Typically, an error is only raised if the
<success/>
stanza was received earlier than
expected)
|
a WockyAuthHandler object |
|
an optional location for a GError to fill, or NULL
|
Returns : |
TRUE on success, otherwise FALSE
|
gboolean wocky_auth_handler_get_initial_response (WockyAuthHandler *handler
,GString **initial_data
,GError **error
);
Called when authentication begins to fetch the initial data to send to the
server in the <auth/>
stanza.
If this function returns TRUE
, initial_data
will be non-NULL
if handler
provides an initial response, and NULL
otherwise.
|
a handler for a SASL mechanism |
|
initial data to send to the server, if any. [out][transfer full] |
|
an optional location for a GError to fill, or NULL
|
Returns : |
TRUE on success; FALSE otherwise. |
const gchar * wocky_auth_handler_get_mechanism (WockyAuthHandler *handler
);
Returns the name of the SASL mechanism handler
implements.
|
a handler for a SASL mechanism. |
Returns : |
the name of the SASL mechanism handler implements. |
gboolean wocky_auth_handler_handle_auth_data (WockyAuthHandler *handler
,const GString *data
,GString **response
,GError **error
);
Asks handler
to respond to a <challenge/>
stanza or a
<success/>
with data. On success, handler
will put
response data into response
, Base64-encoding it if appropriate.
|
a WockyAuthHandler object |
|
the challenge string |
|
a location to fill with a challenge response in a GString. [out][transfer full] |
|
an optional location for a GError to fill, or NULL
|
Returns : |
TRUE on success, otherwise FALSE
|
gboolean wocky_auth_handler_handle_success (WockyAuthHandler *handler
,GError **error
);
Called when a <success/>
stanza is received
during authentication. If no error is returned, then authentication
is considered finished. (Typically, an error is only raised if the
<success/>
stanza was received earlier than
expected)
|
a WockyAuthHandler object |
|
an optional location for a GError to fill, or NULL
|
Returns : |
TRUE on success, otherwise FALSE
|
gboolean wocky_auth_handler_is_plain (WockyAuthHandler *handler
);
Checks whether handler
sends secrets in plaintext. This may be used to
decide whether to use handler
on an insecure XMPP connection.
|
a handler for a SASL mechanism. |
Returns : |
TRUE if handler sends secrets in plaintext. |