passageidentity 0.7.0 → 0.7.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 +4 -4
- data/lib/passageidentity/auth.rb +5 -9
- data/lib/passageidentity/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 48edd9284cb043177840d772dd58a7c1d7ae8cb77f3a52aee0722b2546835048
|
4
|
+
data.tar.gz: f68bacf557d743155928c4265e47fdc734dbed8183e7b20cbe8ab1eb44ac7b1d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f91d166d539836b0434c6120944137dbf15dda319608b62966ec7d2263258467c61856e325303796d2f37bb702c6716a79ddcf2fe88a2ebe4156c7c76b6ce37f
|
7
|
+
data.tar.gz: c632f9b44f9a9ef7ee50a85547095b64ad8c2cb028e5a2b06ca50f6e6101a117ea75310b0f55cd86ceeb0ff753041713da8fc95f68e8e0c083e5ec8d377da115
|
data/lib/passageidentity/auth.rb
CHANGED
@@ -64,7 +64,9 @@ module Passage
|
|
64
64
|
def validate_jwt(token)
|
65
65
|
raise ArgumentError, 'jwt is required.' unless token && !token.empty?
|
66
66
|
|
67
|
-
|
67
|
+
begin
|
68
|
+
fetch_jwks
|
69
|
+
rescue Faraday::Error
|
68
70
|
raise PassageError.new(
|
69
71
|
status_code: 401,
|
70
72
|
body: {
|
@@ -74,15 +76,13 @@ module Passage
|
|
74
76
|
)
|
75
77
|
end
|
76
78
|
|
77
|
-
audiences = [@auth_origin, @app_id]
|
78
|
-
|
79
79
|
claims =
|
80
80
|
JWT.decode(
|
81
81
|
token,
|
82
82
|
nil,
|
83
83
|
true,
|
84
84
|
{
|
85
|
-
aud:
|
85
|
+
aud: @app_id,
|
86
86
|
verify_aud: true,
|
87
87
|
algorithms: ['RS256'],
|
88
88
|
jwks: @jwks
|
@@ -160,7 +160,7 @@ module Passage
|
|
160
160
|
app_cache = get_cache(@app_id)
|
161
161
|
|
162
162
|
if app_cache
|
163
|
-
@jwks
|
163
|
+
@jwks = app_cache
|
164
164
|
else
|
165
165
|
auth_gw_connection =
|
166
166
|
Faraday.new(url: 'https://auth.passage.id') do |f|
|
@@ -170,10 +170,6 @@ module Passage
|
|
170
170
|
f.adapter :net_http
|
171
171
|
end
|
172
172
|
|
173
|
-
# fetch the public key if not in cache
|
174
|
-
app = fetch_app
|
175
|
-
|
176
|
-
@auth_origin = app.auth_origin
|
177
173
|
response =
|
178
174
|
auth_gw_connection.get("/v1/apps/#{@app_id}/.well-known/jwks.json")
|
179
175
|
|
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.7.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Passage by 1Password
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-12-
|
11
|
+
date: 2024-12-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -169,7 +169,7 @@ licenses:
|
|
169
169
|
metadata:
|
170
170
|
source_code_uri: https://github.com/passageidentity/passage-ruby
|
171
171
|
changelog_uri: https://github.com/passageidentity/passage-ruby/CHANGELOG.md
|
172
|
-
post_install_message:
|
172
|
+
post_install_message:
|
173
173
|
rdoc_options: []
|
174
174
|
require_paths:
|
175
175
|
- lib
|
@@ -185,7 +185,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
185
185
|
version: '0'
|
186
186
|
requirements: []
|
187
187
|
rubygems_version: 3.5.23
|
188
|
-
signing_key:
|
188
|
+
signing_key:
|
189
189
|
specification_version: 4
|
190
190
|
summary: Passage Passkey Complete SDK
|
191
191
|
test_files: []
|