passageidentity 0.0.7 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 150a9a5019bc8edcee52a97ca0827e550bcdddf331c53a5d30b93d9ee34c654a
4
- data.tar.gz: 2e426bb06a6b0f48215bd6fc65f14f16bbe89533ef43268477345d6ee1ca10c4
3
+ metadata.gz: 3b98a47138ae131d490133febfdfb84b901e3c204dab4dc77a89b58e7dddc2cb
4
+ data.tar.gz: a8727e11cfedcbc82b36bfc4c2983ec48d7f0932edb8235325727482a32f7190
5
5
  SHA512:
6
- metadata.gz: ccb948349018b0b7d6cca610f450c7ec73a14bb36043d1470186178b7a009f6e3c064812bff3016df0d5366b017e15bf1a58dd6226cca2feab3d91fa283e4d58
7
- data.tar.gz: fe4a77185f3c88c1cde260a55ed9f238b7fc909bcdf57746eb9bd3023ac9ff08f178c6d8c6bd74451e8a8f7c6df79dd5386b46efbf10f538a194bef2570d3ecf
6
+ metadata.gz: 23e4ca4713b66cc334b2fe31a24e0d7b010eea080afbfb783ea4aeee5e62e74c309a422fb35ec95ed6f532c93dc596d1472c77cf599f4d26d763df80090ba29d
7
+ data.tar.gz: bb1e666a5a6baf4ffabfdfd9165e7a679f8174ad312fd6e050b9367b1538ce9b5d4359b56df930ad181865af7198c23d15a6fb76423eade0ec0169d95ce96227
@@ -1,8 +1,10 @@
1
1
  name: PR Checks
2
2
 
3
3
  on:
4
+ workflow_dispatch:
4
5
  pull_request:
5
- branches: [ main ]
6
+ branches:
7
+ - main
6
8
 
7
9
  env:
8
10
  API_KEY: ${{ secrets.API_KEY }}
data/README.md CHANGED
@@ -74,8 +74,7 @@ The information available in the Passage App struct returned by PassageClient.ge
74
74
  :login_url,
75
75
  :rsa_public_key,
76
76
  :allowed_identifer,
77
- :required_identifier,
78
- :require_email_verification,
77
+ :require_identifier_verification,
79
78
  :session_timeout_length,
80
79
  :user_metadata_schema,
81
80
  :layouts,
@@ -111,6 +110,7 @@ The information available in the Passage User struct returned by PassageClient.u
111
110
  :email,
112
111
  :phone,
113
112
  :email_verified,
113
+ :phone_verified,
114
114
  :created_at,
115
115
  :updated_at,
116
116
  :last_login_at,
@@ -184,7 +184,9 @@ The information available in the array of Passage Device struct returned by Pass
184
184
  :cred_id,
185
185
  :friendly_name,
186
186
  :usage_count,
187
- :last_used,
187
+ :updated_at,
188
+ :created_at,
189
+ :last_login_at,
188
190
 
189
191
  ```
190
192
 
@@ -205,7 +207,7 @@ end
205
207
 
206
208
  ## Create an Embeddable Magic Link
207
209
 
208
- To create a magic link, you should use the `create_magic_link` method. You can check out our guide on embeddable magic links in our [docs](https://docs.passage.id/popular-guides/smart-links).
210
+ To create a magic link, you should use the `create_magic_link` method. You can check out our guide on embeddable magic links in our [docs](https://docs.passage.id/guides/embedded-links).
209
211
 
210
212
  ```ruby
211
213
  require 'passageidentity'
@@ -13,9 +13,11 @@ module Passage
13
13
  :login_url,
14
14
  :rsa_public_key,
15
15
  :allowed_identifer,
16
- :required_identifier,
17
- :require_email_verification,
16
+ :require_identifier_verification,
18
17
  :session_timeout_length,
18
+ :refresh_enabled,
19
+ :refresh_absolute_lifetime,
20
+ :refresh_inactivity_lifetime,
19
21
  :user_metadata_schema,
20
22
  :layouts,
21
23
  keyword_init: true
@@ -25,6 +27,7 @@ module Passage
25
27
  :email,
26
28
  :phone,
27
29
  :email_verified,
30
+ :phone_verified,
28
31
  :created_at,
29
32
  :updated_at,
30
33
  :last_login_at,
@@ -51,7 +54,9 @@ module Passage
51
54
  :cred_id,
52
55
  :friendly_name,
53
56
  :usage_count,
54
- :last_used,
57
+ :updated_at,
58
+ :created_at,
59
+ :last_login_at,
55
60
  keyword_init: true
56
61
 
57
62
  COOKIE_STRATEGY = 0
@@ -124,9 +129,13 @@ module Passage
124
129
  login_url: app_info["login_url"],
125
130
  rsa_public_key: app_info["rsa_public_key"],
126
131
  allowed_identifer: app_info["allowed_identifer"],
127
- required_identifier: app_info["required_identifier"],
128
- require_email_verification: app_info["require_email_verification"],
132
+ require_identifier_verification:
133
+ app_info["require_identifier_verification"],
129
134
  session_timeout_length: app_info["session_timeout_length"],
135
+ refresh_enabled: app_info["refresh_enabled"],
136
+ refresh_absolute_lifetime: app_info["refresh_absolute_lifetime"],
137
+ refresh_inactivity_lifetime:
138
+ app_info["refresh_inactivity_lifetime"],
130
139
  user_metadata_schema: app_info["user_metadata_schema"],
131
140
  layouts: app_info["layouts"]
132
141
  )
@@ -22,6 +22,7 @@ module Passage
22
22
  email: user["email"],
23
23
  phone: user["phone"],
24
24
  email_verified: user["email_verified"],
25
+ phone_verified: user["phone_verified"],
25
26
  created_at: user["created_at"],
26
27
  updated_at: user["updated_at"],
27
28
  last_login_at: user["last_login_at"],
@@ -56,6 +57,7 @@ module Passage
56
57
  email: user["email"],
57
58
  phone: user["phone"],
58
59
  email_verified: user["email_verified"],
60
+ phone_verified: user["phone_verified"],
59
61
  created_at: user["created_at"],
60
62
  updated_at: user["updated_at"],
61
63
  last_login_at: user["last_login_at"],
@@ -90,6 +92,7 @@ module Passage
90
92
  email: user["email"],
91
93
  phone: user["phone"],
92
94
  email_verified: user["email_verified"],
95
+ phone_verified: user["phone_verified"],
93
96
  created_at: user["created_at"],
94
97
  updated_at: user["updated_at"],
95
98
  last_login_at: user["last_login_at"],
@@ -128,6 +131,7 @@ module Passage
128
131
  email: user["email"],
129
132
  phone: user["phone"],
130
133
  email_verified: user["email_verified"],
134
+ phone_verified: user["phone_verified"],
131
135
  created_at: user["created_at"],
132
136
  updated_at: user["updated_at"],
133
137
  last_login_at: user["last_login_at"],
@@ -164,6 +168,7 @@ module Passage
164
168
  email: user["email"],
165
169
  phone: user["phone"],
166
170
  email_verified: user["email_verified"],
171
+ phone_verified: user["phone_verified"],
167
172
  created_at: user["created_at"],
168
173
  updated_at: user["updated_at"],
169
174
  last_login_at: user["last_login_at"],
@@ -227,7 +232,9 @@ module Passage
227
232
  cred_id: device["cred_id"],
228
233
  friendly_name: device["friendly_name"],
229
234
  usage_count: device["usage_count"],
230
- last_used: device["last_used"]
235
+ updated_at: device["updated_at"],
236
+ created_at: device["created_at"],
237
+ last_login_at: device["last_login_at"]
231
238
  )
232
239
  )
233
240
  end
@@ -237,5 +244,17 @@ module Passage
237
244
  "failed to delete Passage User Device. Http Status: #{e.response[:status]}. Response: #{e.response[:body]["error"]}"
238
245
  end
239
246
  end
247
+
248
+ def signout(user_id:)
249
+ raise PassageError, "must supply a valid user_id" if user_id.to_s.empty?
250
+ begin
251
+ response =
252
+ @connection.delete("/v1/apps/#{@app_id}/users/#{user_id}/tokens/")
253
+ return true
254
+ rescue Faraday::Error => e
255
+ raise PassageError,
256
+ "failed to revoke user's refresh tokens. Http Status: #{e.response[:status]}. Response: #{e.response[:body]["error"]}"
257
+ end
258
+ end
240
259
  end
241
260
  end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'passageidentity'
3
- s.version = '0.0.7'
3
+ s.version = '0.1.1'
4
4
  s.summary = 'Passage SDK for biometric authentication'
5
5
  s.description =
6
6
  'Enables verification of server-side authentication and user management for applications using Passage'
@@ -69,6 +69,11 @@ class TestUserAPI < Test::Unit::TestCase
69
69
  assert_equal [], devices
70
70
  end
71
71
 
72
+ def test_signout()
73
+ success = PassageClient.user.signout(user_id: $global_test_user.id)
74
+ assert_equal true, success
75
+ end
76
+
72
77
  def teardown()
73
78
  deleted = PassageClient.user.delete(user_id: $global_test_user.id)
74
79
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: passageidentity
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Passage Identity
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-01 00:00:00.000000000 Z
11
+ date: 2022-09-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday