![]() |
![]() |
![]() |
wocky Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Prerequisites |
WockySaslHandler; gboolean (*WockySaslInitialResponseFunc) (WockySaslHandler *handler
,gchar **initial_data
,GError **error
); gboolean (*WockySaslAuthDataFunc) (WockySaslHandler *handler
,const gchar *data
,gchar **response
,GError **error
); gboolean (*WockySaslSuccessFunc) (WockySaslHandler *handler
,GError **error
); void wocky_sasl_handler_free (WockySaslHandler *handler
); const gchar * wocky_sasl_handler_get_mechanism (WockySaslHandler *handler
); gboolean wocky_sasl_handler_is_plain (WockySaslHandler *handler
); gboolean wocky_sasl_handler_get_initial_response (WockySaslHandler *handler
,gchar **initial_data
,GError **error
); gboolean wocky_sasl_handler_handle_auth_data (WockySaslHandler *handler
,const gchar *data
,gchar **response
,GError **error
); gboolean wocky_sasl_handler_handle_success (WockySaslHandler *handler
,GError **error
); WockySaslHandlerIface;
gboolean (*WockySaslInitialResponseFunc) (WockySaslHandler *handler
,gchar **initial_data
,GError **error
);
Called when authentication begins, if the mechanism allows a response to an implicit challenge during SASL initiation (which, in XMPP, corresponds to sending the <auth></auth> stanza to the server).
The function should return TRUE on success and optionally set the initial_data to a string (allocated using g_malloc) if there is initial data to send. On error it should return FALSE and set the error
|
|
|
|
|
|
Returns : |
gboolean (*WockySaslAuthDataFunc) (WockySaslHandler *handler
,const gchar *data
,gchar **response
,GError **error
);
|
|
|
|
|
|
|
|
Returns : |
gboolean (*WockySaslSuccessFunc) (WockySaslHandler *handler
,GError **error
);
Called when a <success></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></success> stanza was received earlier than expected)
|
|
|
|
Returns : |
const gchar * wocky_sasl_handler_get_mechanism (WockySaslHandler *handler
);
|
|
Returns : |
gboolean wocky_sasl_handler_is_plain (WockySaslHandler *handler
);
|
|
Returns : |
gboolean wocky_sasl_handler_get_initial_response (WockySaslHandler *handler
,gchar **initial_data
,GError **error
);
|
|
|
|
|
|
Returns : |
gboolean wocky_sasl_handler_handle_auth_data (WockySaslHandler *handler
,const gchar *data
,gchar **response
,GError **error
);
|
|
|
|
|
|
|
|
Returns : |
gboolean wocky_sasl_handler_handle_success (WockySaslHandler *handler
,GError **error
);
|
|
|
|
Returns : |
typedef struct { GTypeInterface parent; gchar *mechanism; gboolean plain; WockySaslInitialResponseFunc initial_response_func; WockySaslAuthDataFunc auth_data_func; WockySaslSuccessFunc success_func; } WockySaslHandlerIface;
GTypeInterface |
The parent interface. |
gchar * |
The SASL mechanism which this handler responds to challenges for. |
gboolean |
Whether the mechanism this handler handles sends secrets in plaintext. |
WockySaslInitialResponseFunc |
Called when the initial <auth></auth> stanza is generated |
WockySaslAuthDataFunc |
Called when any authentication data from the server is received |
WockySaslSuccessFunc |
Called when a <success></success> stanza is received. |