passageidentity 0.0.5 → 0.0.6
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 +4 -4
- data/CONTRIBUTING.md +1 -1
- data/lib/passageidentity/client.rb +38 -0
- data/passageidentity.gemspec +1 -1
- data/tests/app_test.rb +15 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a690a22154faaee08c7f917391722ba209f13eed6b321a71112906c45c94c4b
|
4
|
+
data.tar.gz: 33d3a29b62ef42d6239d31082a06e9fc070271e4ebbccfa612fe0b6610c6dc58
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 205210cafaa264ea5b1709c9d09a98f37d4f0c5c306a435a5b59972ed620160ad73a5bda9eb610e0df1204127d75c21b4f7138e9ffa5ea41b3a710c7d8098159
|
7
|
+
data.tar.gz: b06a3b13b4f95c3439f3acefee1872656ac151e88d0fa88e0a1b4800662114de2e25c745020ca26de21321b1c0db4f95ee03a977ed8950492e309fd134be6e0e
|
data/CONTRIBUTING.md
CHANGED
@@ -5,6 +5,20 @@ require_relative "user_api"
|
|
5
5
|
require_relative "error"
|
6
6
|
|
7
7
|
module Passage
|
8
|
+
App =
|
9
|
+
Struct.new :name,
|
10
|
+
:id,
|
11
|
+
:auth_origin,
|
12
|
+
:redirect_url,
|
13
|
+
:login_url,
|
14
|
+
:rsa_public_key,
|
15
|
+
:allowed_identifer,
|
16
|
+
:required_identifier,
|
17
|
+
:require_email_verification,
|
18
|
+
:session_timeout_length,
|
19
|
+
:user_metadata_schema,
|
20
|
+
:layouts,
|
21
|
+
keyword_init: true
|
8
22
|
User =
|
9
23
|
Struct.new :id,
|
10
24
|
:status,
|
@@ -98,6 +112,30 @@ module Passage
|
|
98
112
|
end
|
99
113
|
end
|
100
114
|
|
115
|
+
def get_app()
|
116
|
+
begin
|
117
|
+
app_info = @auth.fetch_app()
|
118
|
+
return(
|
119
|
+
Passage::App.new(
|
120
|
+
name: app_info["name"],
|
121
|
+
id: app_info["id"],
|
122
|
+
auth_origin: app_info["auth_origin"],
|
123
|
+
redirect_url: app_info["redirect_url"],
|
124
|
+
login_url: app_info["login_url"],
|
125
|
+
rsa_public_key: app_info["rsa_public_key"],
|
126
|
+
allowed_identifer: app_info["allowed_identifer"],
|
127
|
+
required_identifier: app_info["required_identifier"],
|
128
|
+
require_email_verification: app_info["require_email_verification"],
|
129
|
+
session_timeout_length: app_info["session_timeout_length"],
|
130
|
+
user_metadata_schema: app_info["user_metadata_schema"],
|
131
|
+
layouts: app_info["layouts"]
|
132
|
+
)
|
133
|
+
)
|
134
|
+
rescue => e
|
135
|
+
raise e
|
136
|
+
end
|
137
|
+
end
|
138
|
+
|
101
139
|
def create_magic_link(
|
102
140
|
user_id: "",
|
103
141
|
email: "",
|
data/passageidentity.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'passageidentity'
|
3
|
-
s.version = '0.0.
|
3
|
+
s.version = '0.0.6'
|
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'
|
data/tests/app_test.rb
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
require_relative "../lib/passageidentity/client"
|
2
|
+
require "dotenv"
|
3
|
+
require "faraday"
|
4
|
+
require "test/unit"
|
5
|
+
|
6
|
+
Dotenv.load(".env")
|
7
|
+
class TestAppAPI < Test::Unit::TestCase
|
8
|
+
PassageClient =
|
9
|
+
Passage::Client.new(app_id: ENV["APP_ID"], api_key: ENV["API_KEY"])
|
10
|
+
|
11
|
+
def test_get_app()
|
12
|
+
app = PassageClient.get_app()
|
13
|
+
assert_equal ENV["APP_ID"], app.id
|
14
|
+
end
|
15
|
+
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.
|
4
|
+
version: 0.0.6
|
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-05-
|
11
|
+
date: 2022-05-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -92,6 +92,7 @@ files:
|
|
92
92
|
- lib/passageidentity/user_api.rb
|
93
93
|
- passageidentity.gemspec
|
94
94
|
- tests/all.rb
|
95
|
+
- tests/app_test.rb
|
95
96
|
- tests/auth_test.rb
|
96
97
|
- tests/magic_link_test.rb
|
97
98
|
- tests/user_api_test.rb
|