WockySaslAuth

WockySaslAuth

Synopsis

GQuark              wocky_sasl_auth_error_quark         (void);
#define             WOCKY_SASL_AUTH_ERROR
enum                WockySaslAuthError;
                    WockySaslAuth;
                    WockySaslAuthClass;
                    WockySaslAuthPrivate;
WockySaslAuth *     wocky_sasl_auth_new                 (const gchar *server,
                                                         const gchar *username,
                                                         const gchar *password,
                                                         WockyXmppConnection *connection);
void                wocky_sasl_auth_add_handler         (WockySaslAuth *sasl,
                                                         WockySaslHandler *handler);
void                wocky_sasl_auth_authenticate_async  (WockySaslAuth *sasl,
                                                         WockyStanza *features,
                                                         gboolean allow_plain,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
gboolean            wocky_sasl_auth_authenticate_finish (WockySaslAuth *sasl,
                                                         GAsyncResult *result,
                                                         GError **error);

Object Hierarchy

  GObject
   +----WockySaslAuth

Properties

  "connection"               WockyXmppConnection*  : Read / Write / Construct Only
  "password"                 gchar*                : Write / Construct
  "server"                   gchar*                : Read / Write / Construct
  "username"                 gchar*                : Write / Construct

Description

Details

wocky_sasl_auth_error_quark ()

GQuark              wocky_sasl_auth_error_quark         (void);

Returns :


WOCKY_SASL_AUTH_ERROR

#define             WOCKY_SASL_AUTH_ERROR


enum WockySaslAuthError

typedef enum
{
  /* Failed to initialize our sasl support */
  WOCKY_SASL_AUTH_ERROR_INIT_FAILED,
  /* Server doesn't support sasl (no mechanisms) */
  WOCKY_SASL_AUTH_ERROR_SASL_NOT_SUPPORTED,
  /* Server doesn't support any mechanisms that we support */
  WOCKY_SASL_AUTH_ERROR_NO_SUPPORTED_MECHANISMS,
  /* Couldn't send our stanzas to the server */
  WOCKY_SASL_AUTH_ERROR_NETWORK,
  /* Server sent an invalid reply */
  WOCKY_SASL_AUTH_ERROR_INVALID_REPLY,
  /* Failure to provide user credentials */
  WOCKY_SASL_AUTH_ERROR_NO_CREDENTIALS,
  /* Server sent a failure */
  WOCKY_SASL_AUTH_ERROR_FAILURE,
  /* disconnected */
  WOCKY_SASL_AUTH_ERROR_CONNRESET,
  /* XMPP stream error while authing */
  WOCKY_SASL_AUTH_ERROR_STREAM,
} WockySaslAuthError;


WockySaslAuth

typedef struct _WockySaslAuth WockySaslAuth;


WockySaslAuthClass

typedef struct {
    GObjectClass parent_class;
} WockySaslAuthClass;


WockySaslAuthPrivate

typedef struct _WockySaslAuthPrivate WockySaslAuthPrivate;


wocky_sasl_auth_new ()

WockySaslAuth *     wocky_sasl_auth_new                 (const gchar *server,
                                                         const gchar *username,
                                                         const gchar *password,
                                                         WockyXmppConnection *connection);

server :

username :

password :

connection :

Returns :


wocky_sasl_auth_add_handler ()

void                wocky_sasl_auth_add_handler         (WockySaslAuth *sasl,
                                                         WockySaslHandler *handler);

Provide an external SASL handler to be used during authentication. Handlers (and therefore SASL mechanisms) are prioritised in the order they are added (handlers added earlier take precedence over those added later).

sasl :

handler :


wocky_sasl_auth_authenticate_async ()

void                wocky_sasl_auth_authenticate_async  (WockySaslAuth *sasl,
                                                         WockyStanza *features,
                                                         gboolean allow_plain,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

sasl :

features :

allow_plain :

cancellable :

callback :

user_data :


wocky_sasl_auth_authenticate_finish ()

gboolean            wocky_sasl_auth_authenticate_finish (WockySaslAuth *sasl,
                                                         GAsyncResult *result,
                                                         GError **error);

sasl :

result :

error :

Returns :

Property Details

The "connection" property

  "connection"               WockyXmppConnection*  : Read / Write / Construct Only

The Xmpp connection to user.


The "password" property

  "password"                 gchar*                : Write / Construct

The password to authenticate with.

Default value: NULL


The "server" property

  "server"                   gchar*                : Read / Write / Construct

The name of the server.

Default value: NULL


The "username" property

  "username"                 gchar*                : Write / Construct

The username to authenticate with.

Default value: NULL