Skip to content

Commit

Permalink
Bugfixes jwks (#43)
Browse files Browse the repository at this point in the history
* Sync output

* Rubocop

* Fixed the JWKS output format

* Rubocop

* Fixed tests
  • Loading branch information
bellebaum authored Jan 12, 2022
1 parent 3729192 commit ba0e580
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/oauth_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def self.generate_jwks
jwks << jwk
end
end
jwks.uniq { |k| k['kid'] }
{ keys: jwks.uniq { |k| k['kid'] } }
end

def self.openid_configuration(host, path)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_jwks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def test_jwks
assert last_response.ok?
jwks = JSON.parse last_response.body
assert_equal 1, jwks.length
jwk = jwks[0]
jwk = jwks['keys'][0]
assert_equal "RSA", jwk['kty']
assert_equal "sig", jwk['use']
assert_equal 2, jwk['x5c'].length
Expand Down

0 comments on commit ba0e580

Please sign in to comment.