authsignal-ruby 4.0.0 → 4.1.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: '05993f5ac8d8569efae1a1c17692b90216c135675c922a4ef727124ba4774b5c'
4
- data.tar.gz: 7f1816f80f7bf7517fda22b2f5d2cc0ad9895431031b06e0dfdf52dc4065c355
3
+ metadata.gz: 9c4fa986346960144f15616720f21828275ffabdf16a817e05cadb4ee3c33565
4
+ data.tar.gz: 0b748a47e76e7af70786179cfde9fa037188da9c6beee9d25194e47f61adf98e
5
5
  SHA512:
6
- metadata.gz: eb669c48e8fcb98f9241b0cde59c9aba13b4f1991f83f2e6ca0b127338af6d31c123cac2d3a9dec0cafc19142fb0fe9c5a212f792fb2c5655f22d13757f1dee6
7
- data.tar.gz: 1e2622b946b9979010eb0f34a7de0b76eda3197242d441807b1bde5a038fe6cbd6a70a9e94ef54cdad4c23d1298f5d49f3f3a6ec2a11bd47a594775467c48342
6
+ metadata.gz: 6dfcbd7a4ef015d250e33eebf556f1c651d440de45df9155791748d77f9668e57a40d0e27fb5091290fe178130c3dd70c09cc8aa85829855e317ab263637c5af
7
+ data.tar.gz: 9ed3d53d1cd3772b2c6744dfacf1ff1471f09e743e1b9ba102f3d731b0c39e185533bad167ceb6f536c0b77c2be49b79094e46fafca8840542dc5b73fd1eb31d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- authsignal-ruby (4.0.0)
4
+ authsignal-ruby (4.1.0)
5
5
  faraday (>= 2)
6
6
  faraday-retry (~> 2.2)
7
7
 
@@ -74,6 +74,11 @@ module Authsignal
74
74
  make_request(:get, "users/#{url_encode(user_id)}/actions/#{action}/#{url_encode(idempotency_key)}")
75
75
  end
76
76
 
77
+ def update_action_state(user_id:, action:, idempotency_key:, state:)
78
+ body = { state: state }
79
+ make_request(:patch, "users/#{url_encode(user_id)}/actions/#{action}/#{url_encode(idempotency_key)}", body: body)
80
+ end
81
+
77
82
  ##
78
83
  # TODO: delete identify?
79
84
  def identify(user_id, user_payload)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Authsignal
4
- VERSION = "4.0.0"
4
+ VERSION = "4.1.0"
5
5
  end
data/lib/authsignal.rb CHANGED
@@ -49,6 +49,13 @@ module Authsignal
49
49
  handle_response(response)
50
50
  end
51
51
 
52
+ def update_action_state(user_id:, action:, idempotency_key:, state:)
53
+ # NOTE: Rely on API to respond when given invalid state
54
+ response = Client.new.update_action_state(user_id: user_id, action: action, idempotency_key: idempotency_key, state: state)
55
+
56
+ handle_response(response)
57
+ end
58
+
52
59
  def enroll_verified_authenticator(user_id:, authenticator:)
53
60
  response = Client.new.enroll_verified_authenticator(user_id, authenticator)
54
61
 
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: 4.0.0
4
+ version: 4.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - justinsoong
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-10-25 00:00:00.000000000 Z
11
+ date: 2024-11-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday