diff --git a/lib/jwt/algos.rb b/lib/jwt/algos.rb index a0945305..15897c3e 100644 --- a/lib/jwt/algos.rb +++ b/lib/jwt/algos.rb @@ -13,6 +13,7 @@ module JWT # Signature logic for JWT module Algos extend self + ALGOS = [ Algos::Hmac, Algos::Ecdsa, diff --git a/lib/jwt/algos/none.rb b/lib/jwt/algos/none.rb index 168bc1cc..df0565c7 100644 --- a/lib/jwt/algos/none.rb +++ b/lib/jwt/algos/none.rb @@ -4,11 +4,10 @@ module None module_function SUPPORTED = %w[none].freeze - def verify(*) - end - def sign(*) - end + def verify(*); end + + def sign(*); end end end end diff --git a/lib/jwt/algos/unsupported.rb b/lib/jwt/algos/unsupported.rb index ab995b7a..3c2bb825 100644 --- a/lib/jwt/algos/unsupported.rb +++ b/lib/jwt/algos/unsupported.rb @@ -4,6 +4,7 @@ module Unsupported module_function SUPPORTED = [].freeze + def verify(*) raise JWT::VerificationError, 'Algorithm not supported' end