Thanks for the response - I am going to try and use Apache to perform the 
LDAP authentication

On Monday, March 25, 2019 at 2:41:13 AM UTC+2, Graham Dumpleton wrote:
>
> Another delayed response due to message being missed while was on a trip.
>
> When using Apache on Windows, the default language locale isn't 
> necessarily UTF-8, but something else. In this case, the LDAP module 
> appears to not be tolerant of strange locale values.
>
> I know how to override locale etc when using daemon mode on UNIX systems, 
> or in system startup files on some UNIX systems, but I have no idea how you 
> would over locale etc for Apache on Windows.
>
> Sorry can't really help.
>
> Graham
>
> On 13 Mar 2019, at 4:53 pm, Yaakov Blank <[email protected] <javascript:>> 
> wrote:
>
> Using:
>
>    - Flask
>    - Windows
>    - Ldap3
>    - Connect using TLS
>    - Attaching Apache mod conf file
>
> Using Flask development server ldap user \ password authenticated fine.
> When calling in Apache mod_wsgi received  "unknown encoding: cp0" error on 
> bind()
>
> Appreciate any ideas.
>
> Below is the ldap code snippet:
>
> def auth(serverName, domain, username, password):
>     ldap_server = 'ldaps://%s:636' % (serverName)                         
>     server = Server(ldap_server, get_info=ALL, mode=IP_V4_ONLY, 
> connect_timeout=5)
>     if (not server.check_availability()):
>         raise ValueError('Unable to connect to server %s' % server)
>
>
>     conDict = {'domain': domain, 'username': username} 
>     user_dn = "%(domain)s\\%(username)s" % conDict
>     connection = Connection(server, user_dn, password=password, read_only=
> True, receive_timeout=5)
>     authenticated = connection.bind()
>
>
>     return authenticated 
>
>         
>
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "modwsgi" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] <javascript:>.
> To post to this group, send email to [email protected] <javascript:>
> .
> Visit this group at https://groups.google.com/group/modwsgi.
> For more options, visit https://groups.google.com/d/optout.
> <testWSGI.conf>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" 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 https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to