userbin 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +0 -14
- data/lib/userbin.rb +1 -1
- data/lib/userbin/client.rb +1 -1
- data/lib/userbin/models/backup_codes.rb +4 -0
- data/lib/userbin/models/user.rb +2 -2
- data/lib/userbin/version.rb +1 -1
- metadata +2 -2
- data/lib/userbin/models/recovery_codes.rb +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 01656a6ef1aa891d26aadd81b5c2541f6bdee830
|
4
|
+
data.tar.gz: 131a697805e6e9a2e289efb08c2a2a60a9dfa6e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f46b4ffb2639ba4d842a75b733dd555a46499deeaf40acdbbc1a8ae3b07d1d70132f571eba1b3d75bfa28d1637431718fe395594d3eda29fe3ec9fd2756a4822
|
7
|
+
data.tar.gz: 3ee6024aae53c0502d9df9d8498873092f6121aa4afb521a2dc6e24567d2fce0e8397719595fbe9a2192878f781b31406301a671d4495d22ff58ae63166e806b
|
data/README.md
CHANGED
@@ -291,17 +291,3 @@ Userbin.configure do |config|
|
|
291
291
|
config.request_timeout = 2.0
|
292
292
|
end
|
293
293
|
```
|
294
|
-
|
295
|
-
## Handling Errors
|
296
|
-
|
297
|
-
...
|
298
|
-
|
299
|
-
```ruby
|
300
|
-
class ApplicationController < ActionController::Base
|
301
|
-
rescue_from Userbin::RequestError do |e|
|
302
|
-
redirect_to root_url
|
303
|
-
end
|
304
|
-
end
|
305
|
-
```
|
306
|
-
|
307
|
-
|
data/lib/userbin.rb
CHANGED
@@ -28,6 +28,6 @@ require 'userbin/models/event'
|
|
28
28
|
require 'userbin/models/challenge'
|
29
29
|
require 'userbin/models/monitoring'
|
30
30
|
require 'userbin/models/pairing'
|
31
|
-
require 'userbin/models/
|
31
|
+
require 'userbin/models/backup_codes'
|
32
32
|
require 'userbin/models/session'
|
33
33
|
require 'userbin/models/user'
|
data/lib/userbin/client.rb
CHANGED
@@ -14,7 +14,7 @@ module Userbin
|
|
14
14
|
end
|
15
15
|
|
16
16
|
install_proxy_methods :challenges, :events, :sessions, :pairings,
|
17
|
-
:backup_codes, :
|
17
|
+
:backup_codes, :generate_backup_codes, :enable_mfa, :disable_mfa
|
18
18
|
|
19
19
|
def initialize(request, opts = {})
|
20
20
|
# Save a reference in the per-request store so that the request
|
data/lib/userbin/models/user.rb
CHANGED
@@ -12,11 +12,11 @@ module Userbin
|
|
12
12
|
has_many :sessions
|
13
13
|
|
14
14
|
def backup_codes(params={})
|
15
|
-
Userbin::
|
15
|
+
Userbin::BackupCodes.get("/v1/users/#{id}/backup_codes", params)
|
16
16
|
end
|
17
17
|
|
18
18
|
def generate_backup_codes(params={})
|
19
|
-
Userbin::
|
19
|
+
Userbin::BackupCodes.post("/v1/users/#{id}/backup_codes", params)
|
20
20
|
end
|
21
21
|
end
|
22
22
|
end
|
data/lib/userbin/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: userbin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Johan
|
@@ -178,12 +178,12 @@ files:
|
|
178
178
|
- lib/userbin/errors.rb
|
179
179
|
- lib/userbin/ext/her.rb
|
180
180
|
- lib/userbin/jwt.rb
|
181
|
+
- lib/userbin/models/backup_codes.rb
|
181
182
|
- lib/userbin/models/challenge.rb
|
182
183
|
- lib/userbin/models/event.rb
|
183
184
|
- lib/userbin/models/model.rb
|
184
185
|
- lib/userbin/models/monitoring.rb
|
185
186
|
- lib/userbin/models/pairing.rb
|
186
|
-
- lib/userbin/models/recovery_codes.rb
|
187
187
|
- lib/userbin/models/session.rb
|
188
188
|
- lib/userbin/models/user.rb
|
189
189
|
- lib/userbin/request.rb
|