Remove dependency on MultiJSON

master
Cameron Crockett 2022-07-24 17:56:34 -05:00
parent 5eeb683faf
commit b68a437f39
No known key found for this signature in database
GPG Key ID: 670E4FB756C84718
4 changed files with 7 additions and 5 deletions

View File

@ -1,9 +1,10 @@
PATH
remote: .
specs:
omniauth-keycloak (1.4.1)
omniauth-keycloak (1.4.2)
faraday
json-jwt (~> 1.13.0)
omniauth (~> 2.0.4)
omniauth (>= 2.0)
omniauth-oauth2 (~> 1.7.1)
GEM

View File

@ -1,5 +1,5 @@
module Omniauth
module Keycloak
VERSION = "1.4.2"
VERSION = "1.4.3"
end
end

View File

@ -31,7 +31,7 @@ module OmniAuth
log :debug, "Going to get Keycloak configuration. URL: #{config_url}"
response = Faraday.get config_url
if (response.status == 200)
json = MultiJson.load(response.body)
json = JSON.parse(response.body)
@certs_endpoint = json["jwks_uri"]
@userinfo_endpoint = json["userinfo_endpoint"]
@ -47,7 +47,7 @@ module OmniAuth
log :debug, "Going to get certificates. URL: #{@certs_endpoint}"
certs = Faraday.get @certs_endpoint
if (certs.status == 200)
json = MultiJson.load(certs.body)
json = JSON.parse(response.body)
@certs = json["keys"]
log :debug, "Successfully got certificate. Certificate length: #{@certs.length}"
else

View File

@ -26,6 +26,7 @@ Gem::Specification.new do |spec|
spec.add_dependency "omniauth", ">= 2.0"
spec.add_dependency "omniauth-oauth2", "~> 1.7.1"
spec.add_dependency "json-jwt", "~> 1.13.0"
spec.add_dependency "faraday"
spec.add_development_dependency "bundler", "~> 2.2"
spec.add_development_dependency "rake", "~> 13.0"