Skip to content

Commit ba0e580

Browse files
authored
Bugfixes jwks (#43)
* Sync output * Rubocop * Fixed the JWKS output format * Rubocop * Fixed tests
1 parent 3729192 commit ba0e580

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/oauth_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def self.generate_jwks
7979
jwks << jwk
8080
end
8181
end
82-
jwks.uniq { |k| k['kid'] }
82+
{ keys: jwks.uniq { |k| k['kid'] } }
8383
end
8484

8585
def self.openid_configuration(host, path)

tests/test_jwks.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def test_jwks
2525
assert last_response.ok?
2626
jwks = JSON.parse last_response.body
2727
assert_equal 1, jwks.length
28-
jwk = jwks[0]
28+
jwk = jwks['keys'][0]
2929
assert_equal "RSA", jwk['kty']
3030
assert_equal "sig", jwk['use']
3131
assert_equal 2, jwk['x5c'].length

0 commit comments

Comments
 (0)