github / github/github-ldap

Net::LDAP.new deprecation warning

未關閉
#100 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Ruby
星號
158
分支
28
PR 合併指標
30 天內沒有已合併 PR

描述

When `encryption` parameter is passed as String to Net::LDAP.new

```
ldap_options = {
...
encryption: 'ssl',
}
ldap = GitHub::Ldap.new ldap_options
```

it produces the following [deprecation warning](https://github.com/ruby-ldap/ruby-net-ldap/blob/78e97ed69dc9ebbf06b04e7e70ceb046c23de75c/lib/net/ldap.rb#L622)
`Deprecation warning: please give :encryption option as a Hash to Net::LDAP.new`

At [present](https://github.com/ruby-ldap/ruby-net-ldap/blob/78e97ed69dc9ebbf06b04e7e70ceb046c23de75c/lib/net/ldap.rb#L483), the `encryption` value must be a Hash with parameters, which consists of two keys:
`method:` - `:simple_tls` or `:start_tls`
`tls_options:` - Hash of options for that method

貢獻指南

開啟貢獻指南

研究方向

從 GitHub::Ldap.new 進入點開始,追蹤 ldap_options 如何傳遞到 Net::LDAP.new。將 String 形式與 lib/net/ldap.rb 第 483 行和第 622 行附近的內容進行比較,那里描述了接受的 Hash 結構和警告。當 LDAP 初始化不再產生此棄用警告時,即表示完成。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
ruby
領域
authentication
Issue 類型
缺陷
難度
2/5
預估耗時
1-3 小時
活躍度
停滯
描述清晰度
基本清楚
新手友好度
48/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。