diff --git a/Gemfile.lock b/Gemfile.lock index d485d24..4e144e9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -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 diff --git a/lib/keycloak/version.rb b/lib/keycloak/version.rb index 43e809a..7d0d0aa 100755 --- a/lib/keycloak/version.rb +++ b/lib/keycloak/version.rb @@ -1,5 +1,5 @@ module Omniauth module Keycloak - VERSION = "1.4.2" + VERSION = "1.4.3" end end diff --git a/lib/omniauth/strategies/keycloak-openid.rb b/lib/omniauth/strategies/keycloak-openid.rb index 7995057..060758f 100755 --- a/lib/omniauth/strategies/keycloak-openid.rb +++ b/lib/omniauth/strategies/keycloak-openid.rb @@ -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 diff --git a/omniauth-keycloak.gemspec b/omniauth-keycloak.gemspec index 09f0fb1..1694834 100644 --- a/omniauth-keycloak.gemspec +++ b/omniauth-keycloak.gemspec @@ -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"