omniauth-nitro-id 1.3.0 → 1.3.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: 12b486108d9239335a4eb1457b3a265484d795ba2ddfb9721e05fdb1f0b2158f
4
- data.tar.gz: 798f33be066a605552fce8006ea80908a7c75e4e876af1be51df5731a378f1b1
3
+ metadata.gz: 94818d49d65d4179ff03339392ca757a2edef85eff38effd34179a46f9ea7ebd
4
+ data.tar.gz: 4c07dc9641add8bfe2f1475b2918c40bd092503a3f706d997350f98b6d85eeed
5
5
  SHA512:
6
- metadata.gz: 102501c792823e10ab52fce8163f2b87363c579b680f81561985d96f5919be1482ebba2282aa802b0e03ecbde8eabaa8ad50ee66cde3b31167101aaa47a09a06
7
- data.tar.gz: 9eb1dd8bf0217c2259d2c35b6354b78b4819b59518055e79f32e5027b012350d37cb5506ff89b716321e666cc030442415fd77f7e945f00faf8b4b39ca6ee507
6
+ metadata.gz: 94a566792f0b7df93dc76d34ce06360666569433e144e2e0378c763795947c3d999ca4c4bee1e191d8e5b6295423bf8051331b97357d32af4ef4ec1d18203ef6
7
+ data.tar.gz: 89b005f80dce1165da7269148bb275353b21db553ea60692f4a15fe924f4a8bb7cecb3ace5657ff052a021b323525eb3a17a09f906d262b2f7173fc70bc3ea8a
data/Gemfile.lock CHANGED
@@ -1,29 +1,29 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- omniauth-nitro-id (1.3.0)
4
+ omniauth-nitro-id (1.3.1)
5
5
  omniauth-rails_csrf_protection (= 1.0.1)
6
6
  omniauth_openid_connect (~> 0.4.0)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- actionpack (7.0.7)
12
- actionview (= 7.0.7)
13
- activesupport (= 7.0.7)
11
+ actionpack (7.0.8)
12
+ actionview (= 7.0.8)
13
+ activesupport (= 7.0.8)
14
14
  rack (~> 2.0, >= 2.2.4)
15
15
  rack-test (>= 0.6.3)
16
16
  rails-dom-testing (~> 2.0)
17
17
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
18
- actionview (7.0.7)
19
- activesupport (= 7.0.7)
18
+ actionview (7.0.8)
19
+ activesupport (= 7.0.8)
20
20
  builder (~> 3.1)
21
21
  erubi (~> 1.4)
22
22
  rails-dom-testing (~> 2.0)
23
23
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
24
- activemodel (7.0.7)
25
- activesupport (= 7.0.7)
26
- activesupport (7.0.7)
24
+ activemodel (7.0.8)
25
+ activesupport (= 7.0.8)
26
+ activesupport (7.0.8)
27
27
  concurrent-ruby (~> 1.0, >= 1.0.2)
28
28
  i18n (>= 1.6, < 2)
29
29
  minitest (>= 5.1)
@@ -33,6 +33,7 @@ GEM
33
33
  aes_key_wrap (1.1.0)
34
34
  ast (2.4.2)
35
35
  attr_required (1.0.1)
36
+ base64 (0.1.1)
36
37
  bindata (2.4.15)
37
38
  builder (3.2.4)
38
39
  coderay (1.1.3)
@@ -41,7 +42,8 @@ GEM
41
42
  date (3.3.3)
42
43
  diff-lcs (1.5.0)
43
44
  erubi (1.12.0)
44
- faraday (2.7.10)
45
+ faraday (2.7.11)
46
+ base64
45
47
  faraday-net_http (>= 2.0, < 3.1)
46
48
  ruby2_keywords (>= 0.0.4)
47
49
  faraday-follow_redirects (0.3.0)
@@ -49,7 +51,7 @@ GEM
49
51
  faraday-net_http (3.0.2)
50
52
  ffi (1.15.5)
51
53
  formatador (1.1.0)
52
- guard (2.18.0)
54
+ guard (2.18.1)
53
55
  formatador (>= 0.2.4)
54
56
  listen (>= 2.7, < 4.0)
55
57
  lumberjack (>= 1.0.12, < 2.0)
@@ -96,7 +98,7 @@ GEM
96
98
  method_source (1.0.0)
97
99
  mini_mime (1.1.5)
98
100
  mini_portile2 (2.8.4)
99
- minitest (5.19.0)
101
+ minitest (5.20.0)
100
102
  nenv (0.3.0)
101
103
  net-imap (0.3.7)
102
104
  date
@@ -198,7 +200,7 @@ GEM
198
200
  unicode-display_width (>= 1.4.0, < 3.0)
199
201
  rubocop-ast (1.29.0)
200
202
  parser (>= 3.2.1.0)
201
- rubocop-performance (1.19.0)
203
+ rubocop-performance (1.19.1)
202
204
  rubocop (>= 1.7.0, < 2.0)
203
205
  rubocop-ast (>= 0.4.0)
204
206
  rubocop-powerhome (0.5.0)
data/docs/CHANGELOG.md CHANGED
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.3.1] - 2023-09-21
11
+
12
+ * Display better error message for missing credentials. PR [#27](https://github.com/powerhome/omniauth-nitro-id/pull/27)
13
+
10
14
  ## [1.3.0] - 2023-08-22
11
15
 
12
16
  ### Added
@@ -43,7 +47,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
43
47
 
44
48
  * Initial release
45
49
 
46
- [Unreleased]: https://github.com/powerhome/omniauth-nitro-id/compare/v1.3.0...HEAD
50
+ [Unreleased]: https://github.com/powerhome/omniauth-nitro-id/compare/v1.3.1...HEAD
51
+ [1.3.1]: https://github.com/powerhome/omniauth-nitro-id/releases/tag/v1.3.1
47
52
  [1.3.0]: https://github.com/powerhome/omniauth-nitro-id/releases/tag/v1.3.0
48
53
  [1.2.1]: https://github.com/powerhome/omniauth-nitro-id/releases/tag/v1.2.1
49
54
  [1.2.0]: https://github.com/powerhome/omniauth-nitro-id/releases/tag/v1.2.0
@@ -2,6 +2,6 @@
2
2
 
3
3
  module OmniAuth
4
4
  module NitroId
5
- VERSION = "1.3.0"
5
+ VERSION = "1.3.1"
6
6
  end
7
7
  end
@@ -7,6 +7,7 @@ module OmniAuth
7
7
  module Strategies
8
8
  class BaseStrategy < OmniAuth::Strategies::OpenIDConnect
9
9
  class APIError < StandardError; end
10
+ class ClientCredentialsError < StandardError; end
10
11
 
11
12
  def public_key
12
13
  @public_key ||= if options.discovery
@@ -18,6 +19,13 @@ module OmniAuth
18
19
  end
19
20
  end
20
21
 
22
+ def client
23
+ super
24
+ rescue AttrRequired::AttrMissing
25
+ raise ClientCredentialsError,
26
+ "#{options[:name].camelize} client credentials not found. Please check your environment."
27
+ end
28
+
21
29
  def self.decode_logout_token(token)
22
30
  jwks = fetch_jwks
23
31
  JSON::JWT.decode(token, jwks)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-nitro-id
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Greer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-22 00:00:00.000000000 Z
11
+ date: 2023-09-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth_openid_connect