pwned 1.2.1 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b6891bb23ef6923eaad6c5af0b4fa2d36471c9a6903fbb66940720c6a5a69c2b
4
- data.tar.gz: d138630dcac1204a01adfa731cce9a52ca984b67544f4c0beabe3e51f56d28ed
3
+ metadata.gz: b87c90a53cd7928bf07c03d2d068e0cf2b723a183a4b57fa45bf3baafe1ba892
4
+ data.tar.gz: 6febde4b74e7c054bd15f2038873b0339b31ee7ec1dddb653c8e5d597594a33a
5
5
  SHA512:
6
- metadata.gz: a89fca08322c92a4866d774dd5d2bce8d495326a99d7dfa8b2e8fe12b43ab3d57c0ed29f9aa8dab5d94ed5c002127701cd57daa43f9a621804232c02a4122d15
7
- data.tar.gz: 67a0aaf46f9d84ee81b36e39e72d761aa7b08293246d7fec3abb35bb122d38cf2cd17519850b97573d16bbe346680de6478b1a569c47a1600085b4167e7faa51
6
+ metadata.gz: 171cfd15438c070259d83291d529ae2c935e7ebbf2f639a75d8b9a0428e8be02cdbf14b7150501824233a0b71638cc2aebe9835b0b565348ac6e51da62848772
7
+ data.tar.gz: af7cc5a7a0d1300874b996d2b1838264d9d9eb968b16142234bf624551c193b8a8e9975d744a71498f04ebd33b387c67abb638ea8c9a672463a6cfa4aac8d789
@@ -3,21 +3,27 @@ language: ruby
3
3
 
4
4
  env:
5
5
  matrix:
6
- - RAILS_VERSION=4.2.0
7
- - RAILS_VERSION=5.0.0
8
- - RAILS_VERSION=5.1.0
9
- - RAILS_VERSION=5.2.0.rc1
6
+ - RAILS_VERSION=4.2.11.1
7
+ - RAILS_VERSION=5.0.7.2
8
+ - RAILS_VERSION=5.1.7
9
+ - RAILS_VERSION=5.2.3
10
+ - RAILS_VERSION=6.0.0
10
11
 
11
12
  rvm:
12
- - 2.5.0
13
- - 2.4.0
14
- - 2.3.0
13
+ - 2.6
14
+ - 2.5
15
+ - 2.4
16
+ - 2.3
15
17
  - jruby
16
18
  - ruby-head
17
19
 
18
- before_install: gem install bundler -v 1.16.1
20
+ before_install: gem install bundler
19
21
 
20
22
  matrix:
21
23
  allow_failures:
22
24
  - rvm: ruby-head
23
- - env: RAILS_VERSION=5.2.0.rc1
25
+ exclude:
26
+ - rvm: 2.4
27
+ env: RAILS_VERSION=6.0.0
28
+ - rvm: 2.3
29
+ env: RAILS_VERSION=6.0.0
@@ -2,30 +2,57 @@
2
2
 
3
3
  ## Ongoing [☰](https://github.com/philnash/pwned/compare/v1.2.1...master)
4
4
 
5
- ...
5
+ ## 2.0.0 (October 1, 2019) [☰](https://github.com/philnash/pwned/compare/v1.2.1...v2.0.0)
6
6
 
7
- ## 1.2.1 (March 17, 2018) [☰](https://github.com/philnash/pwned/commits/v1.2.1)
7
+ - Major updates
8
8
 
9
- * Minor updates
10
- * Validator no longer raises `TypeError` when password is `nil`
9
+ - Switches from `open-uri` to `Net::HTTP`. This is a potentially breaking change.
10
+ - `request_options` are now used to configure `Net::HTTP.start`.
11
+ - Rather than using all string keys from `request_options`, HTTP headers are now
12
+ specified in their own `headers` hash. To upgrade, any options intended as
13
+ headers need to be extracted into a `headers` hash, e.g.
11
14
 
12
- ## 1.2.0 (March 15, 2018) [☰](https://github.com/philnash/pwned/commits/v1.2.0)
15
+ ```diff
16
+ validates :password, not_pwned: {
17
+ - request_options: { read_timeout: 5, open_timeout: 1, "User-Agent" => "Super fun user agent" }
18
+ + request_options: { read_timeout: 5, open_timeout: 1, headers: { "User-Agent" => "Super fun user agent" } }
19
+ }
13
20
 
14
- * Major updates
15
- * Changes `PwnedValidator` to `NotPwnedValidator`, so that the validation looks like `validates :password, not_pwned: true`. `PwnedValidator` now subclasses `NotPwnedValidator` for backwards compatibility with version 1.1.0 but is deprecated.
21
+ - password = Pwned::Password.new("password", 'User-Agent' => 'Super fun new user agent')
22
+ + password = Pwned::Password.new("password", headers: { 'User-Agent' => 'Super fun new user agent' }, read_timeout: 10)
23
+ ```
16
24
 
17
- ## 1.1.0 (March 12, 2018) [☰](https://github.com/philnash/pwned/commits/v1.1.0)
25
+ - Adds a CLI to let you check passwords on the command line
18
26
 
19
- * Major updates
20
- * Refactors exception handling with built in Ruby method ([PR #1](https://github.com/philnash/pwned/pull/1) thanks [@kpumuk](https://github.com/kpumuk))
21
- * Passwords must be strings, the initializer will raise a `TypeError` unless `password.is_a? String`. ([dbf7697](https://github.com/philnash/pwned/commit/dbf7697e878d87ac74aed1e715cee19b73473369))
22
- * Added Ruby on Rails validator ([PR #3](https://github.com/philnash/pwned/pull/3) & [PR #6](https://github.com/philnash/pwned/pull/6))
23
- * Added simplified accessors `Pwned.pwned?` and `Pwned.pwned_count` ([PR #4](https://github.com/philnash/pwned/pull/4))
27
+ ```bash
28
+ $ pwned password
29
+ Pwned!
30
+ The password has been found in public breaches 3730471 times.
31
+ ```
24
32
 
25
- * Minor updates
26
- * SHA1 is only calculated once
27
- * Frozen string literal to make sure Ruby does not copy strings over and over again
28
- * Removal of `@match_data`, since we only use it to retrieve the counter. Caching the counter instead (all [PR #2](https://github.com/philnash/pwned/pull/2) thanks [@kpumuk](https://github.com/kpumuk))
33
+ ## 1.2.1 (March 17, 2018) [☰](https://github.com/philnash/pwned/compare/v1.2.0...v1.2.1)
34
+
35
+ - Minor updates
36
+ - Validator no longer raises `TypeError` when password is `nil`
37
+
38
+ ## 1.2.0 (March 15, 2018) [☰](https://github.com/philnash/pwned/compare/v1.1.0...v1.2.0)
39
+
40
+ - Major updates
41
+ - Changes `PwnedValidator` to `NotPwnedValidator`, so that the validation looks like `validates :password, not_pwned: true`. `PwnedValidator` now subclasses `NotPwnedValidator` for backwards compatibility with version 1.1.0 but is deprecated.
42
+
43
+ ## 1.1.0 (March 12, 2018) [☰](https://github.com/philnash/pwned/compare/v1.0.0...v1.1.0)
44
+
45
+ - Major updates
46
+
47
+ - Refactors exception handling with built in Ruby method ([PR #1](https://github.com/philnash/pwned/pull/1) thanks [@kpumuk](https://github.com/kpumuk))
48
+ - Passwords must be strings, the initializer will raise a `TypeError` unless `password.is_a? String`. ([dbf7697](https://github.com/philnash/pwned/commit/dbf7697e878d87ac74aed1e715cee19b73473369))
49
+ - Added Ruby on Rails validator ([PR #3](https://github.com/philnash/pwned/pull/3) & [PR #6](https://github.com/philnash/pwned/pull/6))
50
+ - Added simplified accessors `Pwned.pwned?` and `Pwned.pwned_count` ([PR #4](https://github.com/philnash/pwned/pull/4))
51
+
52
+ - Minor updates
53
+ - SHA1 is only calculated once
54
+ - Frozen string literal to make sure Ruby does not copy strings over and over again
55
+ - Removal of `@match_data`, since we only use it to retrieve the counter. Caching the counter instead (all [PR #2](https://github.com/philnash/pwned/pull/2) thanks [@kpumuk](https://github.com/kpumuk))
29
56
 
30
57
  ## 1.0.0 (March 6, 2018) [☰](https://github.com/philnash/pwned/commits/v1.0.0)
31
58
 
data/README.md CHANGED
@@ -6,6 +6,21 @@ An easy, Ruby way to use the Pwned Passwords API.
6
6
 
7
7
  [API docs](https://philnash.github.io/pwned/) | [GitHub repo](https://github.com/philnash/pwned)
8
8
 
9
+ ## Table of Contents
10
+
11
+ * [About](#about)
12
+ * [Installation](#installation)
13
+ * [Usage](#usage)
14
+ * [Plain Ruby](#plain-ruby)
15
+ * [Rails (ActiveRecord)](#activerecord-validator)
16
+ * [Devise](#devise)
17
+ * [Command line](#command-line)
18
+ * [How Pwned is Pi?](#how-pwned-is-pi)
19
+ * [Development](#development)
20
+ * [Contributing](#contributing)
21
+ * [License](#license)
22
+ * [Code of Conduct](#code-of-conduct)
23
+
9
24
  ## About
10
25
 
11
26
  Troy Hunt's [Pwned Passwords API V2](https://haveibeenpwned.com/API/v2#PwnedPasswords) allows you to check if a password has been found in any of the huge data breaches.
@@ -14,6 +29,8 @@ Troy Hunt's [Pwned Passwords API V2](https://haveibeenpwned.com/API/v2#PwnedPass
14
29
 
15
30
  The data from this API is provided by [Have I been pwned?](https://haveibeenpwned.com/). Before using the API, please check [the acceptable uses and license of the API](https://haveibeenpwned.com/API/v2#AcceptableUse).
16
31
 
32
+ Here is a blog post I wrote on [how to use this gem in your Ruby applications to make your users' passwords better](https://www.twilio.com/blog/2018/03/better-passwords-in-ruby-applications-pwned-passwords-api.html).
33
+
17
34
  ## Installation
18
35
 
19
36
  Add this line to your application's Gemfile:
@@ -32,6 +49,14 @@ Or install it yourself as:
32
49
 
33
50
  ## Usage
34
51
 
52
+ There are a few ways you can use this gem:
53
+
54
+ 1. [Plain Ruby](#plain-ruby)
55
+ 2. [Rails](#activerecord-validator)
56
+ 3. [Rails and Devise](#devise)
57
+
58
+ ### Plain Ruby
59
+
35
60
  To test a password against the API, instantiate a `Pwned::Password` object and then ask if it is `pwned?`.
36
61
 
37
62
  ```ruby
@@ -72,10 +97,11 @@ Pwned.pwned_count("password")
72
97
 
73
98
  #### Advanced
74
99
 
75
- You can set options and headers to be used with `open-uri` when making the request to the API. HTTP headers must be string keys and the [other options are available in the `OpenURI::OpenRead` module](https://ruby-doc.org/stdlib-2.5.0/libdoc/open-uri/rdoc/OpenURI/OpenRead.html#method-i-open).
100
+ You can set http request options to be used with `Net::HTTP.start` when making the request to the API. These options are
101
+ documented in the [`Net::HTTP.start` documentation](http://ruby-doc.org/stdlib-2.6.3/libdoc/net/http/rdoc/Net/HTTP.html#method-c-start). The `:headers` option defines defines HTTP headers. These headers must be string keys.
76
102
 
77
103
  ```ruby
78
- password = Pwned::Password.new("password", { 'User-Agent' => 'Super fun new user agent' })
104
+ password = Pwned::Password.new("password", headers: { 'User-Agent' => 'Super fun new user agent' }, read_timeout: 10)
79
105
  ```
80
106
 
81
107
  ### ActiveRecord Validator
@@ -113,7 +139,7 @@ class User < ApplicationRecord
113
139
  end
114
140
  ```
115
141
 
116
- #### Network Errors Handling
142
+ #### Network Error Handling
117
143
 
118
144
  By default the record will be treated as valid when we cannot reach the [haveibeenpwned.com](https://haveibeenpwned.com/) servers. This can be changed with the `:on_error` validator parameter:
119
145
 
@@ -145,17 +171,101 @@ end
145
171
 
146
172
  #### Custom Request Options
147
173
 
148
- You can configure network requests made from the validator using `:request_options` (see [OpenURI::OpenRead#open](http://ruby-doc.org/stdlib-2.5.0/libdoc/open-uri/rdoc/OpenURI/OpenRead.html#method-i-open) for the list of available options, string keys represent custom network request headers, e.g. `"User-Agent"`):
174
+ You can configure network requests made from the validator using `:request_options` (see [Net::HTTP.start](http://ruby-doc.org/stdlib-2.6.3/libdoc/net/http/rdoc/Net/HTTP.html#method-c-start) for the list of available options).
175
+ In addition to these options, HTTP headers can be specified with the `:headers` key, e.g. `"User-Agent"`):
149
176
 
150
177
  ```ruby
151
178
  validates :password, not_pwned: {
152
- request_options: { read_timeout: 5, open_timeout: 1, "User-Agent" => "Super fun user agent" }
179
+ request_options: { read_timeout: 5, open_timeout: 1, headers: { "User-Agent" => "Super fun user agent" } }
153
180
  }
154
181
  ```
155
182
 
156
- ## TODO
183
+ ### Devise
184
+
185
+ If you are using Devise I recommend you use the [devise-pwned_password extension](https://github.com/michaelbanfield/devise-pwned_password) which is now powered by this gem.
186
+
187
+ ### Command line
188
+
189
+ The gem provides a command line utility for checking passwords. You can call it from your terminal application like this:
190
+
191
+ ```bash
192
+ $ pwned password
193
+ Pwned!
194
+ The password has been found in public breaches 3645804 times.
195
+ ```
196
+
197
+ If you don't want the password you are checking to be visible, call:
198
+
199
+ ```bash
200
+ $ pwned --secret
201
+ ```
202
+
203
+ You will be prompted for the password, but it won't be displayed.
204
+
205
+ ## How Pwned is Pi?
206
+
207
+ [@daz](https://github.com/daz) [shared](https://twitter.com/dazonic/status/1074647842046660609) a fantastic example of using this gem to show how many times the digits of Pi have been used as passwords and leaked.
208
+
209
+ ```ruby
210
+ require 'pwned'
211
+
212
+ PI = '3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651328230664709384460955058223172535940812848111'
213
+
214
+ for n in 1..40
215
+ password = Pwned::Password.new PI[0..(n + 1)]
216
+ str = [ n.to_s.rjust(2) ]
217
+ str << (password.pwned? ? '😡' : '😃')
218
+ str << password.pwned_count.to_s.rjust(4)
219
+ str << password.password
157
220
 
158
- - [ ] Devise plugin
221
+ puts str.join ' '
222
+ end
223
+ ```
224
+
225
+ The results may, or may not, surprise you.
226
+
227
+ ```
228
+ 1 😡 16 3.1
229
+ 2 😡 238 3.14
230
+ 3 😡 34 3.141
231
+ 4 😡 1345 3.1415
232
+ 5 😡 2552 3.14159
233
+ 6 😡 791 3.141592
234
+ 7 😡 9582 3.1415926
235
+ 8 😡 1591 3.14159265
236
+ 9 😡 637 3.141592653
237
+ 10 😡 873 3.1415926535
238
+ 11 😡 137 3.14159265358
239
+ 12 😡 103 3.141592653589
240
+ 13 😡 65 3.1415926535897
241
+ 14 😡 201 3.14159265358979
242
+ 15 😡 41 3.141592653589793
243
+ 16 😡 57 3.1415926535897932
244
+ 17 😡 28 3.14159265358979323
245
+ 18 😡 29 3.141592653589793238
246
+ 19 😡 1 3.1415926535897932384
247
+ 20 😡 7 3.14159265358979323846
248
+ 21 😡 5 3.141592653589793238462
249
+ 22 😡 2 3.1415926535897932384626
250
+ 23 😡 2 3.14159265358979323846264
251
+ 24 😃 0 3.141592653589793238462643
252
+ 25 😡 3 3.1415926535897932384626433
253
+ 26 😃 0 3.14159265358979323846264338
254
+ 27 😃 0 3.141592653589793238462643383
255
+ 28 😃 0 3.1415926535897932384626433832
256
+ 29 😃 0 3.14159265358979323846264338327
257
+ 30 😃 0 3.141592653589793238462643383279
258
+ 31 😃 0 3.1415926535897932384626433832795
259
+ 32 😃 0 3.14159265358979323846264338327950
260
+ 33 😃 0 3.141592653589793238462643383279502
261
+ 34 😃 0 3.1415926535897932384626433832795028
262
+ 35 😃 0 3.14159265358979323846264338327950288
263
+ 36 😃 0 3.141592653589793238462643383279502884
264
+ 37 😃 0 3.1415926535897932384626433832795028841
265
+ 38 😃 0 3.14159265358979323846264338327950288419
266
+ 39 😃 0 3.141592653589793238462643383279502884197
267
+ 40 😃 0 3.1415926535897932384626433832795028841971
268
+ ```
159
269
 
160
270
  ## Development
161
271
 
@@ -0,0 +1,52 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'pwned'
4
+ require 'optparse'
5
+ require 'io/console'
6
+
7
+ options = {}
8
+ parser = OptionParser.new do |opts|
9
+ opts.banner = <<-USAGE
10
+ Usage: pwned <password>
11
+
12
+ Tests a password against the Pwned Passwords API using the k-anonymity model,
13
+ which avoids sending the entire password to the service.opts
14
+
15
+ If the password has been found in a publicly available breach then this tool
16
+ will report how many times it has been seen. Otherwise the tool will report that
17
+ the password has not been found in a public breach yet.
18
+
19
+ USAGE
20
+
21
+ opts.version = Pwned::VERSION
22
+
23
+ opts.on("-s", "--secret", "Enter password without displaying characters.\n#{" "* 37}Overrides provided arguments.")
24
+ opts.on_tail("-h", "--help", "Show help.")
25
+ opts.on_tail("-v", "--version", "Show version number.\n\n")
26
+ end
27
+
28
+ parser.parse!(ARGV, into: options)
29
+
30
+ if options[:help]
31
+ puts parser.help
32
+ exit
33
+ end
34
+ if options[:version]
35
+ puts parser.ver
36
+ exit
37
+ end
38
+ password_to_test = ARGV.first
39
+ if options[:secret]
40
+ password_to_test = STDIN.getpass("Password: ")
41
+ end
42
+ if !password_to_test || password_to_test.strip == ""
43
+ puts parser.help
44
+ exit
45
+ end
46
+ password = Pwned::Password.new(password_to_test || ARGV.first)
47
+ if password.pwned?
48
+ puts "Pwned!\nThe password has been found in public breaches #{password.pwned_count} times."
49
+ else
50
+ puts "The password has not been found in a public breach."
51
+ end
52
+
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: NotPwnedValidator
8
8
 
9
- &mdash; Documentation by YARD 0.9.12
9
+ &mdash; Documentation by YARD 0.9.20
10
10
 
11
11
  </title>
12
12
 
@@ -194,11 +194,16 @@ various ways</p>
194
194
  <p class="children"><span class='object_link'><a href="PwnedValidator.html" title="PwnedValidator (class)">PwnedValidator</a></span></p>
195
195
  </div>
196
196
 
197
- <h2>Constant Summary</h2>
198
- <dl class="constants">
199
-
200
- <dt id="DEFAULT_ON_ERROR-constant" class="">DEFAULT_ON_ERROR =
201
- <div class="docstring">
197
+
198
+ <h2>
199
+ Constant Summary
200
+ <small><a href="#" class="constants_summary_toggle">collapse</a></small>
201
+ </h2>
202
+
203
+ <dl class="constants">
204
+
205
+ <dt id="DEFAULT_ON_ERROR-constant" class="">DEFAULT_ON_ERROR =
206
+ <div class="docstring">
202
207
  <div class="discussion">
203
208
 
204
209
  <p>The default behaviour of this validator in the case of an API failure. The
@@ -228,11 +233,11 @@ invalid.</p>
228
233
  </ul>
229
234
 
230
235
  </div>
231
- </dt>
232
- <dd><pre class="code"><span class='symbol'>:valid</span></pre></dd>
233
-
234
- <dt id="DEFAULT_THRESHOLD-constant" class="">DEFAULT_THRESHOLD =
235
- <div class="docstring">
236
+ </dt>
237
+ <dd><pre class="code"><span class='symbol'>:valid</span></pre></dd>
238
+
239
+ <dt id="DEFAULT_THRESHOLD-constant" class="">DEFAULT_THRESHOLD =
240
+ <div class="docstring">
236
241
  <div class="discussion">
237
242
 
238
243
  <p>The default threshold for whether a breach is considered pwned. The default
@@ -262,10 +267,11 @@ invalid.</p>
262
267
  </ul>
263
268
 
264
269
  </div>
265
- </dt>
266
- <dd><pre class="code"><span class='int'>0</span></pre></dd>
267
-
268
- </dl>
270
+ </dt>
271
+ <dd><pre class="code"><span class='int'>0</span></pre></dd>
272
+
273
+ </dl>
274
+
269
275
 
270
276
 
271
277
 
@@ -478,9 +484,9 @@ validation</p>
478
484
  </div>
479
485
 
480
486
  <div id="footer">
481
- Generated on Sat Mar 17 09:15:06 2018 by
487
+ Generated on Tue Oct 1 21:19:37 2019 by
482
488
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
483
- 0.9.12 (ruby-2.5.0).
489
+ 0.9.20 (ruby-2.5.5).
484
490
  </div>
485
491
 
486
492
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Module: Pwned
8
8
 
9
- &mdash; Documentation by YARD 0.9.12
9
+ &mdash; Documentation by YARD 0.9.20
10
10
 
11
11
  </title>
12
12
 
@@ -108,11 +108,16 @@ getting the results for a password.</p>
108
108
 
109
109
  </p>
110
110
 
111
- <h2>Constant Summary</h2>
112
- <dl class="constants">
113
-
114
- <dt id="VERSION-constant" class="">VERSION =
115
- <div class="docstring">
111
+
112
+ <h2>
113
+ Constant Summary
114
+ <small><a href="#" class="constants_summary_toggle">collapse</a></small>
115
+ </h2>
116
+
117
+ <dl class="constants">
118
+
119
+ <dt id="VERSION-constant" class="">VERSION =
120
+ <div class="docstring">
116
121
  <div class="discussion">
117
122
 
118
123
  <p>The current version of the <code>pwned</code> gem.</p>
@@ -124,10 +129,11 @@ getting the results for a password.</p>
124
129
 
125
130
 
126
131
  </div>
127
- </dt>
128
- <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>1.2.1</span><span class='tstring_end'>&quot;</span></span></pre></dd>
129
-
130
- </dl>
132
+ </dt>
133
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>2.0.0</span><span class='tstring_end'>&quot;</span></span></pre></dd>
134
+
135
+ </dl>
136
+
131
137
 
132
138
 
133
139
 
@@ -259,7 +265,8 @@ getting the results for a password.</p>
259
265
 
260
266
  &mdash;
261
267
  <div class='inline'>
262
- <p>Options that can be passed to <code>open</code> when calling the API</p>
268
+ <p>Options that can be passed to <code>Net::HTTP.start</code> when calling the
269
+ API</p>
263
270
  </div>
264
271
 
265
272
  </li>
@@ -275,17 +282,17 @@ getting the results for a password.</p>
275
282
  <ul class="option">
276
283
 
277
284
  <li>
278
- <span class="name">'User-Agent'</span>
279
- <span class="type">(<tt>String</tt>)</span>
285
+ <span class="name">:headers</span>
286
+ <span class="type">(<tt>Symbol</tt>)</span>
280
287
  <span class="default">
281
288
 
282
289
  &mdash; default:
283
- <tt>&quot;Ruby Pwned::Password #{Pwned::VERSION}&quot;</tt>
290
+ <tt>{ &quot;User-Agent&quot; =&gt; &#39;&quot;Ruby Pwned::Password #{Pwned::VERSION}&quot; }</tt>
284
291
 
285
292
  </span>
286
293
 
287
294
  &mdash; <div class='inline'>
288
- <p>The user agent used when making an API request.</p>
295
+ <p>HTTP headers to include in the request</p>
289
296
  </div>
290
297
 
291
298
  </li>
@@ -408,7 +415,8 @@ getting the results for a password.</p>
408
415
 
409
416
  &mdash;
410
417
  <div class='inline'>
411
- <p>Options that can be passed to <code>open</code> when calling the API</p>
418
+ <p>Options that can be passed to <code>Net::HTTP.start</code> when calling the
419
+ API</p>
412
420
  </div>
413
421
 
414
422
  </li>
@@ -424,17 +432,17 @@ getting the results for a password.</p>
424
432
  <ul class="option">
425
433
 
426
434
  <li>
427
- <span class="name">'User-Agent'</span>
428
- <span class="type">(<tt>String</tt>)</span>
435
+ <span class="name">:headers</span>
436
+ <span class="type">(<tt>Symbol</tt>)</span>
429
437
  <span class="default">
430
438
 
431
439
  &mdash; default:
432
- <tt>&quot;Ruby Pwned::Password #{Pwned::VERSION}&quot;</tt>
440
+ <tt>{ &quot;User-Agent&quot; =&gt; &#39;&quot;Ruby Pwned::Password #{Pwned::VERSION}&quot; }</tt>
433
441
 
434
442
  </span>
435
443
 
436
444
  &mdash; <div class='inline'>
437
- <p>The user agent used when making an API request.</p>
445
+ <p>HTTP headers to include in the request</p>
438
446
  </div>
439
447
 
440
448
  </li>
@@ -503,9 +511,9 @@ getting the results for a password.</p>
503
511
  </div>
504
512
 
505
513
  <div id="footer">
506
- Generated on Sat Mar 17 09:15:06 2018 by
514
+ Generated on Tue Oct 1 21:19:37 2019 by
507
515
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
508
- 0.9.12 (ruby-2.5.0).
516
+ 0.9.20 (ruby-2.5.5).
509
517
  </div>
510
518
 
511
519
  </div>