authsignal-ruby 2.0.0 → 2.1.1

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: 2abb851e23947d6e5e888a7b1773ee3b87eb3c21e121944ddd30b9b930edf315
4
- data.tar.gz: 9966e065c8d7aa2da856fb95fcbde6db428809e02d72e3fba4659af105508164
3
+ metadata.gz: 5ca1d4818fc1ff9c662b04b0fce7b3ad532b081826d8418ea6d359e681bcd0cc
4
+ data.tar.gz: de37f34d38fc6e63ef6011c86f363b05f60121ddb9fb4ed65401578ef189b55f
5
5
  SHA512:
6
- metadata.gz: 898f6940954145afb4bbaaba817ffa66e3f4a336cb4e2bc1b87df32af0a1e9d354d93f1c6e0bdb8e82c47571734d7e04da7d0c81ef13300cfb14d47f7fe222ff
7
- data.tar.gz: 2a07fdc089590b7d7cd6d8a5cb60d3ce5c94aa03923a6bf0e58b549ab40bf13484af0ac3787bc509f6d6d25f09301b760474b3d41d26719874d7f4062d896516
6
+ metadata.gz: 5b4b25771cbe3d0ed5a7614a72822dd8dc4b63c1919bfed01fe63c2771b107b552c637aceee4a4c0253b6cf7f4cea1be18243843297e8909e907ab7d9d3931e7
7
+ data.tar.gz: fc07cba6d3564da885b71b4883df830fb08c91cba961b0d07d76a71d513e6c5175514ba5f0a749cb65a971b9a3606a7f63dadd437628d0a795ebf98428a02a12
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- authsignal-ruby (2.0.0)
4
+ authsignal-ruby (2.1.1)
5
5
  httparty (~> 0.21.0)
6
6
 
7
7
  GEM
@@ -44,6 +44,10 @@ module Authsignal
44
44
  get(path)
45
45
  end
46
46
 
47
+ def update_user(user_id:, user:)
48
+ post("/users/#{ERB::Util.url_encode(user_id)}", body: JSON.generate(user))
49
+ end
50
+
47
51
  def validate_challenge(user_id: nil, token:)
48
52
  path = "/validate"
49
53
 
@@ -52,8 +56,8 @@ module Authsignal
52
56
  handle_response(response)
53
57
  end
54
58
 
55
- def get_action(user_id, action_code, idempotency_key)
56
- get("/users/#{ERB::Util.url_encode(user_id)}/actions/#{action_code}/#{ERB::Util.url_encode(idempotency_key)}")
59
+ def get_action(user_id, action, idempotency_key)
60
+ get("/users/#{ERB::Util.url_encode(user_id)}/actions/#{action}/#{ERB::Util.url_encode(idempotency_key)}")
57
61
  end
58
62
 
59
63
  def identify(user_id, user_payload)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Authsignal
4
- VERSION = "2.0.0"
4
+ VERSION = "2.1.1"
5
5
  end
data/lib/authsignal.rb CHANGED
@@ -26,8 +26,13 @@ module Authsignal
26
26
  response.transform_keys { |key| underscore(key) }.transform_keys(&:to_sym)
27
27
  end
28
28
 
29
- def get_action(user_id:, action_code:, idempotency_key:)
30
- response = Client.new.get_action(user_id, action_code, idempotency_key)
29
+ def update_user(user_id:, user:)
30
+ response = Client.new.update_user(user_id: user_id, user: user)
31
+ response.transform_keys { |key| underscore(key) }.transform_keys(&:to_sym)
32
+ end
33
+
34
+ def get_action(user_id:, action:, idempotency_key:)
35
+ response = Client.new.get_action(user_id, action, idempotency_key)
31
36
  response.transform_keys { |key| underscore(key) }.transform_keys(&:to_sym)
32
37
  end
33
38
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: authsignal-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - justinsoong
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-04-15 00:00:00.000000000 Z
11
+ date: 2024-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -67,7 +67,7 @@ dependencies:
67
67
  - !ruby/object:Gem::Version
68
68
  version: 3.14.0
69
69
  description: Authsignal is a passwordless authentication/multifactor authentication
70
- step up service with a FraudOps rules engine
70
+ with modern factors like passkeys
71
71
  email:
72
72
  - justin@authsignal.com
73
73
  executables: []
@@ -109,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  requirements: []
112
- rubygems_version: 3.5.3
112
+ rubygems_version: 3.5.11
113
113
  signing_key:
114
114
  specification_version: 4
115
115
  summary: The Authsignal ruby server side signal API.