authsignal-ruby 2.1.2 → 2.1.3
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 +4 -0
- data/lib/authsignal/version.rb +1 -1
- data/lib/authsignal.rb +5 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 261ad3aa9e626f62f4b8ec843b0ec4516a157b083980cae0ed7c8641f16b5088
|
4
|
+
data.tar.gz: 56d2f9ad45e5f6330999034ee7ac4667f5864bd0a2a745941f11edca0e840395
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eac78f4ddab0dbb2d042c2d77ce424b512524cb0c1b31c5c956793e651441a4b2d93c1611a195eadfe53b4d377c1ad404a2190ee2b88add9a5867c40ba5c396e
|
7
|
+
data.tar.gz: a0178eda449c5707522d441d680fd7ea7586fa21694a4ca7ea14a24b83543b9cfbcdf0613a00c2ad7d5f9cc10465ac3d767c8449dad6a18aaa44e85298fe96cd
|
data/Gemfile.lock
CHANGED
data/lib/authsignal/client.rb
CHANGED
@@ -72,6 +72,10 @@ module Authsignal
|
|
72
72
|
post("/users/#{ERB::Util.url_encode(user_id)}/authenticators", body: JSON.generate(authenticator))
|
73
73
|
end
|
74
74
|
|
75
|
+
def delete_user_authenticator(user_id:, user_authenticator_id:)
|
76
|
+
delete("/users/#{ERB::Util.url_encode(user_id)}/authenticators/#{ERB::Util.url_encode(user_authenticator_id)}")
|
77
|
+
end
|
78
|
+
|
75
79
|
def get(path, query: {})
|
76
80
|
self.class.get(path, headers: @headers, basic_auth: {username: @api_key})
|
77
81
|
end
|
data/lib/authsignal/version.rb
CHANGED
data/lib/authsignal.rb
CHANGED
@@ -54,6 +54,11 @@ module Authsignal
|
|
54
54
|
response
|
55
55
|
end
|
56
56
|
|
57
|
+
def delete_user_authenticator(user_id:, user_authenticator_id: )
|
58
|
+
response = Client.new.delete_user_authenticator(user_id: user_id, user_authenticator_id: user_authenticator_id)
|
59
|
+
response.transform_keys { |key| underscore(key) }.transform_keys(&:to_sym)
|
60
|
+
end
|
61
|
+
|
57
62
|
def track(event, options={})
|
58
63
|
raise ArgumentError, "Action Code is required" unless event[:action].to_s.length > 0
|
59
64
|
raise ArgumentError, "User ID value" unless event[:user_id].to_s.length > 0
|