Very simple SASL mechanisms implementation
This SASL mechanism architecture shold be simple
use init_mech(mech_name, mode, callback=None) function to create SASLSession instance.
PLAIN and it’s ‘server’ and ‘client’ side.
example: init_mech(‘PLAIN’, ‘server’)
organizing dialog boxes. so this is like in gsasl.
callback, if supplied, must be callable with one parameter - the name of field which server wishes client to return. The return value of callback will be then assigned to same name property in client’s object ‘.properties’ dict property
Use step() or step64() method of SASLSession instance to pass data to it’s working mechanism.
code - indicating error, success or asking for more data;
At time of this writting, valid values considered to be: ‘ok’, ‘error’, ‘need_more’.
- gsasl supports more error codes indicating various
errors, depending on mechanism being used. and this step() methods should also somehow specify errors. possibly, the good way for farther development of this methods (and particularly this package mechanisms) is, in case of errors, return strings starting with ‘error’ text and continuing with ‘_some_spec’ to indicate specific error.
counterpart. (In case of error, usually no any data should be sent farther, but read documentation on specifics of mechanism being used)
it’s input, passes decoding result to step(), after what encodes step() result and returning it’s to caller.
To develop new mechanism - create new file with it’s name in ‘mechs’ directory. Write some code: take plain.py for example.
When Your new mechanism module is complete, register it in sasl.py, by editing ‘MECHANISMS’ dict in sasl.py top.
Anythin other is on conscience of programmer.
TODO: Figure out how to actually get changelog content.
Changelog content for this version goes here.