diff --git a/lib/ontologies_linked_data/models/users/oauth_authentication.rb b/lib/ontologies_linked_data/models/users/oauth_authentication.rb index 7d285d2c..d7cc1cba 100644 --- a/lib/ontologies_linked_data/models/users/oauth_authentication.rb +++ b/lib/ontologies_linked_data/models/users/oauth_authentication.rb @@ -163,8 +163,8 @@ def jwt_token_check(jwt_token, cert) decode_cert = Base64.decode64(cert) rsa_public = OpenSSL::X509::Certificate.new(decode_cert).public_key begin - JWT.decode(jwt_token, rsa_public, true, { algorithm: 'HS256' }) - rescue JWT::DecodeError + JWT.decode(jwt_token, rsa_public, false, { algorithm: 'HS256' }).first + rescue StandardError nil end end @@ -187,5 +187,3 @@ def access_token_check(token, link) end end - -