You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| π Check it out! | β¨ [github.com/appraisal-rb/appraisal2][πappraisal2] β¨ |
93
94
95
+
94
96
### Enterprise Support [](https://tidelift.com/subscription/pkg/rubygems-omniauth-ldap?utm_source=rubygems-omniauth-ldap&utm_medium=referral&utm_campaign=readme)
95
97
96
98
Available as part of the Tidelift Subscription.
@@ -197,48 +199,48 @@ Below are several concrete examples to get you started.
197
199
198
200
```ruby
199
201
# config.ru
200
-
require'rack'
201
-
require'omniauth-ldap'
202
+
require"rack"
203
+
require"omniauth-ldap"
202
204
203
-
use Rack::Session::Cookie, secret:'change_me'
205
+
use Rack::Session::Cookie, secret:"change_me"
204
206
use OmniAuth::Builderdo
205
207
provider :ldap,
206
-
host:'ldap.example.com',
208
+
host:"ldap.example.com",
207
209
port:389,
208
210
method::plain,
209
-
base:'dc=example,dc=com',
210
-
uid:'uid',
211
-
title:'Example LDAP'
211
+
base:"dc=example,dc=com",
212
+
uid:"uid",
213
+
title:"Example LDAP"
212
214
end
213
215
214
-
run lambda { |env| [404, {'Content-Type' => 'text/plain'}, [env.key?('omniauth.auth').to_s]] }
216
+
run lambda { |env| [404, {"Content-Type" => "text/plain"}, [env.key?("omniauth.auth").to_s]] }
215
217
```
216
218
217
219
Visit `GET /auth/ldap` to initiate authentication (the middleware will render a login form unless you POST to `/auth/ldap`).
0 commit comments