authsignal-ruby 2.0.0 → 2.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/authsignal/client.rb +14 -2
- data/lib/authsignal/version.rb +1 -1
- data/lib/authsignal.rb +12 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 48ebd8ec89b609d681ae6277fedb6066ce662e6b951e6a36b0d8d21c36d4e776
|
4
|
+
data.tar.gz: 37c41a67b2b9d0979aff65ced189a4e400245911f78ed02607d7fadf26a5a005
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 96e71fb2bb2eb01015b9860d47c2aed8e9d85a8dda8d7387c140130c8dda0cb78663275dcfa285e2b9ab4b292af96343d1bf2bca71b14234ac8db03c039e24d2
|
7
|
+
data.tar.gz: bd96e884f222202d34f0f97607c76a46294b70aeb3358668ff47cc4b3f31da98935d32b51b0a38efb0fb253c4c52ea58d9cc4b48a2a48350ba55c9f4ea8159fa
|
data/Gemfile.lock
CHANGED
data/lib/authsignal/client.rb
CHANGED
@@ -44,6 +44,14 @@ 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
|
+
|
51
|
+
def delete_user(user_id:)
|
52
|
+
delete("/users/#{ERB::Util.url_encode(user_id)}")
|
53
|
+
end
|
54
|
+
|
47
55
|
def validate_challenge(user_id: nil, token:)
|
48
56
|
path = "/validate"
|
49
57
|
|
@@ -52,8 +60,8 @@ module Authsignal
|
|
52
60
|
handle_response(response)
|
53
61
|
end
|
54
62
|
|
55
|
-
def get_action(user_id,
|
56
|
-
get("/users/#{ERB::Util.url_encode(user_id)}/actions/#{
|
63
|
+
def get_action(user_id, action, idempotency_key)
|
64
|
+
get("/users/#{ERB::Util.url_encode(user_id)}/actions/#{action}/#{ERB::Util.url_encode(idempotency_key)}")
|
57
65
|
end
|
58
66
|
|
59
67
|
def identify(user_id, user_payload)
|
@@ -72,6 +80,10 @@ module Authsignal
|
|
72
80
|
self.class.post(path, headers: @headers, body: body, basic_auth: {username: @api_key})
|
73
81
|
end
|
74
82
|
|
83
|
+
def delete(path, query: {}, body: {})
|
84
|
+
self.class.delete(path, headers: @headers, body: body, basic_auth: {username: @api_key})
|
85
|
+
end
|
86
|
+
|
75
87
|
private
|
76
88
|
|
77
89
|
def version
|
data/lib/authsignal/version.rb
CHANGED
data/lib/authsignal.rb
CHANGED
@@ -26,8 +26,18 @@ module Authsignal
|
|
26
26
|
response.transform_keys { |key| underscore(key) }.transform_keys(&:to_sym)
|
27
27
|
end
|
28
28
|
|
29
|
-
def
|
30
|
-
response = Client.new.
|
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 delete_user(user_id:)
|
35
|
+
response = Client.new.delete_user(user_id: user_id)
|
36
|
+
response.transform_keys { |key| underscore(key) }.transform_keys(&:to_sym)
|
37
|
+
end
|
38
|
+
|
39
|
+
def get_action(user_id:, action:, idempotency_key:)
|
40
|
+
response = Client.new.get_action(user_id, action, idempotency_key)
|
31
41
|
response.transform_keys { |key| underscore(key) }.transform_keys(&:to_sym)
|
32
42
|
end
|
33
43
|
|
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.
|
4
|
+
version: 2.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- justinsoong
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-10-02 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
|
-
|
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.
|
112
|
+
rubygems_version: 3.5.16
|
113
113
|
signing_key:
|
114
114
|
specification_version: 4
|
115
115
|
summary: The Authsignal ruby server side signal API.
|