userbin 1.4.1 → 1.4.3

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
  SHA1:
3
- metadata.gz: 2c467897ebaae2d6c5cef06b2080f1958487b288
4
- data.tar.gz: 69836254bd945b716fa4fc343949a3d3d2ffef4c
3
+ metadata.gz: 213cb349e7987434937ef6fd4483b78ae0f5b4b7
4
+ data.tar.gz: 9f61c2eeb48ff12e2b9c22daf81dcab435699a53
5
5
  SHA512:
6
- metadata.gz: 94605755aa9f97e062729648ea5792599e4d3d680839c509733244628156d65955caa5ba66fd90ab2a795417d88518f2dabbf3a9a8f96e4273f38dc51652dc48
7
- data.tar.gz: 7a5bd85a6b9efba8025b87ae7b11ee9f7236938c816860ad510386e66a0d89fb6003a209b56130a7b3a1cb64b2fd3a81ddfeaf4839f16367ae7bf896bb7590f0
6
+ metadata.gz: 87aaede95dd81c178b522c0b9a39e77d67803f7164106c825db47b07da2c3619860e758778c29c7c915a3e1ad7b0bff2ec5145ae81e11d3d7641f88bf729f9e7
7
+ data.tar.gz: c3e27530f507731571a97320a75683bd16e13698118eadf2b16fb23ad8b7bfbf7759ef47bac05acc579e528a1f3f2431b3fb15d4dab4a7a6f7fae66f0f165381
@@ -109,9 +109,9 @@ module Userbin
109
109
 
110
110
  identify(user_id)
111
111
 
112
- session = Userbin::Session.post(
113
- "users/#{@session_store.user_id}/sessions", user: user_attrs,
114
- trusted_device_token: self.trusted_device_token)
112
+ user = Userbin::User.new(@session_store.user_id)
113
+ session = user.sessions.create(
114
+ user: user_attrs, trusted_device_token: self.trusted_device_token)
115
115
 
116
116
  # Set the session token for use in all subsequent requests
117
117
  self.session_token = session.token
@@ -1,6 +1,5 @@
1
1
  module Userbin
2
2
  class Session < Model
3
3
  collection_path "users/:user_id/sessions"
4
- instance_post :refresh
5
4
  end
6
5
  end
@@ -21,7 +21,7 @@ module Userbin
21
21
  end
22
22
 
23
23
  def has_challenge?
24
- !!@jwt.payload['chg']
24
+ @jwt.payload['chg'] == 1
25
25
  end
26
26
 
27
27
  def mfa_enabled?
@@ -31,9 +31,5 @@ module Userbin
31
31
  def device_trusted?
32
32
  @jwt.payload['tru'] == 1
33
33
  end
34
-
35
- def challenge_type
36
- @jwt.payload['chg']['typ'].to_sym if has_challenge?
37
- end
38
34
  end
39
35
  end
@@ -1,3 +1,3 @@
1
1
  module Userbin
2
- VERSION = "1.4.1"
2
+ VERSION = "1.4.3"
3
3
  end
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.4.1
4
+ version: 1.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Johan