Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Net::LDAP compatibility #65

Merged
merged 2 commits into from
Feb 8, 2016

Conversation

JulianKniephoff
Copy link

Passing the encryption method to Net::LDAP#new is apparently not officially supported prior to version 0.13.0 of the net-ldap gem. And even then, the API is a bit different from how it is used here. When passed as a parameter to he initializer, Net::LDAP expects it to be a hash or an array.

The "right" way to do it prior to 0.13.0 (which, given the versions as stated in the gemspec, is the way this library would have to take) is to call Net::LDAP#encryption after its creation. This then even works with just giving it a symbol; it will do normalization for you. It will also warn you about its deprecation with versions of net-ldap from 0.13.0 onwards.

All this is supported by ruby-ldap/ruby-net-ldap#250.

Note that this wouldn't show up in the tests as this causes an error only in Net::LDAP#open, not in the initializer itself, but any call to this method is stubbed out in the test suite.

miketierney added a commit that referenced this pull request Feb 8, 2016
@miketierney miketierney merged commit 9646ded into omniauth:master Feb 8, 2016
JulianKniephoff added a commit to JulianKniephoff/seminar-manager that referenced this pull request Feb 14, 2016
@JulianKniephoff JulianKniephoff deleted the net-ldap-compatibility branch July 20, 2020 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants