Class
CamelSasl
Description [src]
abstract class Camel.Sasl : GObject.Object
{
CamelSaslPrivate* priv
}
SASL (Secure Authentication and Security Layer) support.
CamelSasl is an abstract base class for pluggable authentication
mechanisms used by connection-based mail services. It implements the
Secure Authentication part of SASL, providing a challenge-response
interface that can be invoked multiple times until authentication completes.
Non-SASL authentication mechanisms that fit the same challenge-response
design (such as LOGIN and NTLM) are also wrapped in CamelSasl subclasses
to simplify their use.
Instances are created via the camel_sasl_new() factory function, which
looks up the named mechanism. The main API is camel_sasl_challenge(), which
takes a server challenge token and returns the client’s response token.
A base64 convenience wrapper, camel_sasl_challenge_base64(), is provided
for protocols that exchange base64-encoded tokens.
Available built-in mechanisms include: ANONYMOUS, CRAM-MD5, DIGEST-MD5, GSSAPI (Kerberos), LOGIN, NTLM, PLAIN, POPB4SMTP, and XOAUTH2 variants.
Functions
camel_sasl_is_xoauth2_alias
Checks whether exists a CamelSasl method for the mechanism and
whether it derives from CamelSaslXOAuth2. Such mechanisms are
also treated as XOAUTH2, even their real name is different.
since: 3.28
Instance methods
camel_sasl_challenge
If token is NULL, asynchronously 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 asynchronous result is the response.
since: 3.0
camel_sasl_challenge_base64
As with camel_sasl_challenge(), but the challenge token and the
response are both base64-encoded.
since: 3.0
camel_sasl_challenge_base64_finish
Finishes the operation started with camel_sasl_challenge_base64().
since: 3.0
camel_sasl_challenge_base64_sync
As with camel_sasl_challenge_sync(), but the challenge token and the
response are both base64-encoded.
since: 3.0
camel_sasl_challenge_finish
Finishes the operation started with camel_sasl_challenge(). Free the returned GByteArray with g_byte_array_free().
since: 3.0
camel_sasl_challenge_sync
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.
camel_sasl_try_empty_password
Asynchronously determine whether sasl can be used for password-less
authentication, for example single-sign-on using system credentials.
since: 3.2
camel_sasl_try_empty_password_finish
Finishes the operation started with camel_sasl_try_empty_password().
since: 3.2
Signals
Signals inherited from GObject (1)
GObject::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.
Class structure
struct CamelSaslClass {
GObjectClass parent_class;
CamelServiceAuthType* auth_type;
gboolean (* try_empty_password_sync) (
CamelSasl* sasl,
GCancellable* cancellable,
GError** error
);
GByteArray* (* challenge_sync) (
CamelSasl* sasl,
GByteArray* token,
GCancellable* cancellable,
GError** error
);
gpointer reserved;
}
No description available.
Class members
parent_class: GObjectClassNo description available.
auth_type: CamelServiceAuthType*No description available.
try_empty_password_sync: gboolean (* try_empty_password_sync) ( CamelSasl* sasl, GCancellable* cancellable, GError** error )No description available.
challenge_sync: GByteArray* (* challenge_sync) ( CamelSasl* sasl, GByteArray* token, GCancellable* cancellable, GError** error )No description available.
reserved: gpointerNo description available.
Virtual methods
Camel.SaslClass.challenge_sync
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.