Hi, I'm trying to implement a connection to the active directory system of my domain.
In the documentation I find the necessary change to the app_cgf.py file.
But it seems to me related to the old versions because it uses:
base_config.auth_backend = 'ldapauth'
without using the new method: base_config.update_blueprint
I tried to translate the code for 2.4, assuming I could transform (I don't know if it is correct ...):
base_config.sa_auth.cookie_secret = 'secret'
base_config.auth_backend = 'ldapauth'
in:
base_config.update_blueprint ({
'sa_auth.cookie_secret': 'secret',
'auth_backend': 'ldapauth',
})
But when I go to define:
class ApplicationAuthMetadata (TGAuthMetadata):
def __init __ (self, sa_auth):
self.sa_auth = sa_auth
to then connect it to the configuration:
base_config.sa_auth.authmetadata = ApplicationAuthMetadata (
base_config.sa_auth)
with the update_blueprint method I cannot pass the sa_auth parameter which is not defined.
base_config.update_blueprint ({
'sa_auth.authmetadata': ApplicationAuthMetadata (?????????????)
})
I get the impression that there are also repoze.who problems because I had to modify
repoze.who.plugins.sa (implements -> @implementer). So maybe python3 porting is not yet possible ...
Any advice is appreciated.
Thanks in advance.
Enrico