omniauth-krystal 1.3.0 → 1.5.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c90fb431fe32e4ab575e637d96209631d6c76f52760a3e358ab81d0f59fb6c93
|
4
|
+
data.tar.gz: f6dcc39bd7e7d9b0be570693fbcff5d188eca826c975faa79e04d1ee3184afb3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa4c4e05ce103e63c144798b63ecbdefc6162200e5249d57aea2f07c45d74a3124a7ce084c166833033a3a927410ea727948eaff2e2f87f004b2944706cbff50
|
7
|
+
data.tar.gz: 260dc2fda6587ad42f9e8b7155cae2834cd1ae3b86878334b7719d3a92af1565bce8e56a3df353144b414e5292efb70e62aa5fbcff1010d357d42eda04b65509
|
@@ -18,12 +18,14 @@ module OmniAuth
|
|
18
18
|
class AntiReplayTokenAlreadyUsedError < Error
|
19
19
|
end
|
20
20
|
|
21
|
+
JWT_RESERVED_CLAIMS = %w[ar exp nbf iss aud jti iat sub].freeze
|
22
|
+
|
21
23
|
def initialize(app, options = {})
|
22
24
|
@app = app
|
23
25
|
@options = options
|
24
26
|
|
25
27
|
@options[:provider_name] ||= 'krystal'
|
26
|
-
@options[:identity_url] ||= ENV.fetch('KRYSTAL_IDENTITY_URL', 'https://identity.
|
28
|
+
@options[:identity_url] ||= ENV.fetch('KRYSTAL_IDENTITY_URL', 'https://identity.krystal.io')
|
27
29
|
@options[:anti_replay_expiry_seconds] ||= 60
|
28
30
|
|
29
31
|
@keys = SigningKeys.new("#{@options[:identity_url]}/.well-known/signing.json")
|
@@ -66,6 +68,9 @@ module OmniAuth
|
|
66
68
|
# thinks the session is trusted as normal.
|
67
69
|
env['rack.session']['omniauth.state'] = state
|
68
70
|
|
71
|
+
# Set any additional params that were passed in the state.
|
72
|
+
env['rack.session']['omniauth.params'] = data.reject { |key| JWT_RESERVED_CLAIMS.include?(key) }
|
73
|
+
|
69
74
|
@app.call(env)
|
70
75
|
end
|
71
76
|
# rubocop:enable Metrics/AbcSize
|
@@ -8,7 +8,7 @@ module OmniAuth
|
|
8
8
|
option :name, 'krystal'
|
9
9
|
|
10
10
|
option :client_options,
|
11
|
-
url: ENV.fetch('KRYSTAL_IDENTITY_URL', 'https://identity.
|
11
|
+
url: ENV.fetch('KRYSTAL_IDENTITY_URL', 'https://identity.krystal.io'),
|
12
12
|
site: ENV.fetch('KRYSTAL_IDENTITY_API_URL', nil),
|
13
13
|
authorize_url: ENV.fetch('KRYSTAL_IDENTITY_OAUTH_AUTHORIZE_URL', nil),
|
14
14
|
token_url: ENV.fetch('KRYSTAL_IDENTITY_OAUTH_TOKEN_URL', nil)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-krystal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Cooke
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-07-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|