Configure LDAP when adding Plone Site in setuphandlers

I'm trying to configure ldap when adding Plone Site.
In I've checking if LDAP plugin is enabled:
'' in site.REQUEST.form.get('extension_ids')
but acctually I have no idea how to access specific settings to setup for example: Groups Base DN.
Is it even possible to access it in

Maybe take a look at what I did here a few years ago...

OK. Thank you.