Hi,
I am trying to integrate ldap authentication in my pyramid project as per
this guide <http://docs.pylonsproject.org/projects/pyramid_ldap/en/latest/>.
Here is __init__.py file where i am doing basic configuration for ldap.
* config = Configurator(settings=settings, root_factory=Root)*
* #Include the ldap module. *
* config.include('pyramid_ldap')*
* config.add_route('login', '/login')*
* #LDAP*
* config.ldap_setup(*
* 'ldap://127.0.0.1 <http://127.0.0.1>',*
* bind='CN=admin,DC=example,DC=com',*
* passwd='synerzip'*
* )*
* config.ldap_set_login_query(*
* base_dn='CN=admin,DC=example,DC=com',*
* filter_tmpl='',*
* scope = ldap.SCOPE_ONELEVEL,*
* )*
* config.ldap_set_groups_query(*
* base_dn='CN=admin,DC=example,DC=com',*
* filter_tmpl='',*
* scope = ldap.SCOPE_SUBTREE,*
* cache_period = 0,*
* )*
Here in my view i am trying to authenticate LDAP user which is already
exist on LDAP server.
*@view_config(route_name='login',*
* renderer='json')*
*@forbidden_view_config(renderer='json')*
*def login(request):*
*login = request.POST['username']*
* password = request.POST['password']*
* connector = get_ldap_connector(request)*
* data = connector.authenticate(login, password)*
The above line gives* *** PROTOCOL_ERROR: {'desc': 'Protocol error'}*
I don't know what i am missing here.
Thanks,
Abdul Wahid
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pylons-discuss.
For more options, visit https://groups.google.com/d/optout.