![]() |
![]() |
![]() |
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.
sasl : |
a CamelSasl object |
token : |
a token, or NULL
|
ex : |
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.
sasl : |
a CamelSasl object |
token : |
a base64-encoded token |
ex : |
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);
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);
mechanism : |
the SASL mechanism to get an authtype for |
Returns : | a CamelServiceAuthType for the given mechanism, if it is supported. |