Camel.Sasl¶
- Subclasses:
Camel.SaslAnonymous
,Camel.SaslCramMd5
,Camel.SaslDigestMd5
,Camel.SaslGssapi
,Camel.SaslLogin
,Camel.SaslNTLM
,Camel.SaslPOPB4SMTP
,Camel.SaslPlain
,Camel.SaslXOAuth2
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/en |
|||
r/w/co |
|||
r/w/co |
|||
r/w/co |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class Camel.Sasl(**kwargs)¶
- Bases:
- Abstract:
Yes
- Structure:
- classmethod authtype(mechanism)¶
- Parameters:
mechanism (
str
) – the SASL mechanism to get an authtype for- Returns:
a
Camel.ServiceAuthType
for the given mechanism, if it is supported.- Return type:
- classmethod authtype_list(include_plain)¶
- classmethod is_xoauth2_alias(mechanism)¶
- Parameters:
- Returns:
whether exists
Camel.Sasl
for the given mechanism, which also derives fromCamel.SaslXOAuth2
.- Return type:
Checks whether exists a
Camel.Sasl
method for the mechanism and whether it derives fromCamel.SaslXOAuth2
. Such mechanisms are also treated as XOAUTH2, even their real name is different.New in version 3.28.
- classmethod new(service_name, mechanism, service)¶
- Parameters:
service_name (
str
) – the SASL service namemechanism (
str
) – the SASL mechanismservice (
Camel.Service
) – theCamel.Service
that will be using this SASL
- Returns:
a new
Camel.Sasl
object for the given service_name, mechanism, and service, orNone
if the mechanism is not supported.- Return type:
Camel.Sasl
orNone
- challenge(token, io_priority, cancellable, callback, *user_data)¶
- Parameters:
io_priority (
int
) – the I/O priority of the requestcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
callback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
to call when the request is satisfieduser_data (
object
orNone
) – data to pass to the callback function
If token is
None
, asynchronously generate the initial SASL message to send to the server. (This will beNone
if the client doesn’t initiate the exchange.) Otherwise, token is a challenge from the server, and the asynchronous result is the response.When the operation is finished, callback will be called. You can then call
Camel.Sasl.challenge_finish
() to get the result of the operation.New in version 3.0.
- challenge_base64(token, io_priority, cancellable, callback, *user_data)¶
- Parameters:
token (
str
) – a base64-encoded tokenio_priority (
int
) – the I/O priority of the requestcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
callback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
to call when the request is satisfieduser_data (
object
orNone
) – data to pass to the callback function
As with
Camel.Sasl.challenge
(), but the challenge token and the response are both base64-encoded.When the operation is finished, callback will be called. You can then call
Camel.Sasl.challenge_base64_finish
() to get the result of the operation.New in version 3.0.
- challenge_base64_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
the base64-encoded response
- Return type:
Finishes the operation started with
Camel.Sasl.challenge_base64
().New in version 3.0.
- challenge_base64_sync(token, cancellable)¶
- Parameters:
token (
str
) – a base64-encoded tokencancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
the base64-encoded response
- Return type:
As with
Camel.Sasl.challenge_sync
(), but the challenge token and the response are both base64-encoded.New in version 3.0.
- challenge_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
the SASL response or
None
. If an error occurred, error will also be set.- Return type:
Finishes the operation started with
Camel.Sasl.challenge
(). Free the returnedGLib.ByteArray
withGLib.ByteArray.free
().New in version 3.0.
- challenge_sync(token, cancellable)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
the SASL response or
None
. If an error occurred, error will also be set.- Return type:
If token is
None
, generate the initial SASL message to send to the server. (This will beNone
if the client doesn’t initiate the exchange.) Otherwise, token is a challenge from the server, and the return value is the response.Free the returned
GLib.ByteArray
withGLib.ByteArray.free
().
- get_authenticated()¶
- get_service()¶
- Return type:
New in version 2.32.
- set_authenticated(authenticated)¶
- Parameters:
authenticated (
bool
) – whether we have successfully authenticated
New in version 2.32.
- try_empty_password(io_priority, cancellable, callback, *user_data)¶
- Parameters:
io_priority (
int
) – the I/O priority of the requestcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
callback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
to call when the request is satisfieduser_data (
object
orNone
) – data to pass to the callback function
Asynchronously determine whether self can be used for password-less authentication, for example single-sign-on using system credentials.
When the operation is finished, callback will be called. You can then call
Camel.Sasl.try_empty_password_finish
() to get the result of the operation.New in version 3.2.
- try_empty_password_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
the SASL response. If an error occurred, error will also be set.
- Return type:
Finishes the operation started with
Camel.Sasl.try_empty_password
().New in version 3.2.
- try_empty_password_sync(cancellable)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
whether or not self can attempt to authenticate without a password being provided by the caller. This will be
True
for an authentication method which can attempt to use single-sign-on credentials, but which can fall back to using a provided password so it still has the need_password flag set in its description.- Return type:
New in version 3.2.
- do_challenge_sync(token, cancellable) virtual¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Returns:
the SASL response or
None
. If an error occurred, error will also be set.- Return type:
If token is
None
, generate the initial SASL message to send to the server. (This will beNone
if the client doesn’t initiate the exchange.) Otherwise, token is a challenge from the server, and the return value is the response.Free the returned
GLib.ByteArray
withGLib.ByteArray.free
().
- do_try_empty_password_sync(cancellable) virtual¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Returns:
whether or not sasl can attempt to authenticate without a password being provided by the caller. This will be
True
for an authentication method which can attempt to use single-sign-on credentials, but which can fall back to using a provided password so it still has the need_password flag set in its description.- Return type:
New in version 3.2.
Property Details¶
- Camel.Sasl.props.authenticated¶
- Name:
authenticated
- Type:
- Default Value:
- Flags:
- Camel.Sasl.props.mechanism¶
- Name:
mechanism
- Type:
- Default Value:
- Flags:
- Camel.Sasl.props.service¶
- Name:
service
- Type:
- Default Value:
- Flags: