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 摘要。