Infinity.SaslContextSession¶
Fields¶
None
Methods¶
|
|
|
|
|
|
|
Details¶
- class Infinity.SaslContextSession¶
Infinity.SaslContextSession
represents an ongoing authentication session. Create withInfinity.SaslContext.server_start_session
() orInfinity.SaslContext.client_start_session
().- continue_(retval)¶
- Parameters:
retval (
int
) – Error code of the operation requested.
When the callback function specified in
Infinity.SaslContext.set_callback
() is called then self waits for the user to callInfinity.SaslContextSession.continue_
(). It should do so once it provided the requested property usingInfinity.SaslContextSession.set_property
() with retval being %GSASL_OK. If it decides that the property cannot be provided then it should still call this function with retval being a SASL error code specifying the problem.
- feed(data, func, *user_data)¶
- Parameters:
data (
str
) – The data to feed to the SASL session.func (
Infinity.SaslContextSessionFeedFunc
) – The function to call when the data has been processed.user_data (
object
orNone
) – Additional user data to pass to func.
This function feeds data from the session’s remote counterpart to self. It should be base64 encoded. This function will, asynchronously, process the data and query for properties it requires to do so. Once it has finished, func is called with output data to send to the remote side to be fed to its session counterpart.
This function must not be called again before func was called.
- get_property(prop)¶
- Parameters:
prop (
int
) – A SASL property.- Returns:
The value of the property, or
None
. The value is owned by the session and must not be freed.- Return type:
Returns the value of the property prop in self. If the value does not yet exist then this function returns
None
. It does not invoke theInfinity.SaslContextCallbackFunc
to query it.
- is_processing()¶
- Returns:
Whether self is currently processing data asynchronously.
- Return type:
Returns whether the session is currently asynchronously processing data fed to it with
Infinity.SaslContextSession.feed
(). In this case the first call needs to finish before another one is allowed to be made.