| Camel Reference Manual | ||||
|---|---|---|---|---|
CamelSasl;
GByteArray* camel_sasl_challenge (CamelSasl *sasl,
GByteArray *token,
CamelException *ex);
char* camel_sasl_challenge_base64 (CamelSasl *sasl,
const char *token,
CamelException *ex);
gboolean camel_sasl_authenticated (CamelSasl *sasl);
CamelSasl* camel_sasl_new (const char *service_name,
const char *mechanism,
CamelService *service);
GList* camel_sasl_authtype_list (gboolean include_plain);
CamelServiceAuthType* camel_sasl_authtype (const char *mechanism);
typedef struct {
CamelObject parent_object;
char *service_name;
char *mech; /* mechanism */
CamelService *service;
gboolean authenticated;
} CamelSasl;
GByteArray* camel_sasl_challenge (CamelSasl *sasl, GByteArray *token, CamelException *ex);
If token is NULL, generate the initial SASL message to send to
the server. (This will be NULL if the client doesn't initiate the
exchange.) Otherwise, token is a challenge from the server, and
the return value is the response.
|
a CamelSasl object |
|
a token, or NULL
|
|
a CamelException |
Returns : |
the SASL response or NULL. If an error occurred, ex will
also be set.
|
char* camel_sasl_challenge_base64 (CamelSasl *sasl, const char *token, CamelException *ex);
As with camel_sasl_challenge, but the challenge token and the
response are both base64-encoded.
|
a CamelSasl object |
|
a base64-encoded token |
|
a CamelException |
Returns : |
the base64 encoded challenge string |
CamelSasl* camel_sasl_new (const char *service_name, const char *mechanism, CamelService *service);
GList* camel_sasl_authtype_list (gboolean include_plain);
|
whether or not to include the PLAIN mechanism |
Returns : |
a GList of SASL-supported authtypes. The caller must free the list, but not the contents. |
CamelServiceAuthType* camel_sasl_authtype (const char *mechanism);
|
the SASL mechanism to get an authtype for |
Returns : |
a CamelServiceAuthType for the given mechanism, if it is supported. |