Skip to content

Commit

Permalink
fix keycloak oauth
Browse files Browse the repository at this point in the history
  • Loading branch information
syphax-bouazzouni committed Nov 10, 2024
1 parent 89bc241 commit a132679
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -187,5 +187,3 @@ def access_token_check(token, link)

end
end


0 comments on commit a132679

Please sign in to comment.