cschiewek / devise_ldap_authenticatable

Devise Module for LDAP
MIT License
594 stars 359 forks source link

Allow ldap_config to set Net::LDAP encryption options #246

Closed kevinrobinson closed 4 years ago

kevinrobinson commented 6 years ago

Hello! This PR allows callers to set the Net::LDAP encryption configuration. I want to pass some additional options that I can't from the outside right now.

To do this, the PR updates connection.rb to allow passing any encryption options to Net::LDAP, rather than just the simple ssl: true options that are currently enabled. It's backwards compatible and doesn't change the way existing config values are read.

This contains one unrelated change, since following the development guide in the README ran into migration errors. Those are addressed here. By running RAILS_ENV=test bundle exec rake db:migrate it also created changes to the schema.rb file. It seemed good to include these here so other new developers can contribute, but if you want me to exclude I can push another commit doing that.

Thanks!