module JWT::JWA::Compat::ClassMethods

Public Instance Methods

from_algorithm(algorithm) click to toggle source
# File lib/jwt/jwa/compat.rb, line 7
def from_algorithm(algorithm)
  new(algorithm)
end
sign(algorithm, msg, key) click to toggle source
# File lib/jwt/jwa/compat.rb, line 11
def sign(algorithm, msg, key)
  Deprecations.warning('Support for calling sign with positional arguments will be removed in future ruby-jwt versions')

  from_algorithm(algorithm).sign(data: msg, signing_key: key)
end
verify(algorithm, key, signing_input, signature) click to toggle source
# File lib/jwt/jwa/compat.rb, line 17
def verify(algorithm, key, signing_input, signature)
  Deprecations.warning('Support for calling verify with positional arguments will be removed in future ruby-jwt versions')

  from_algorithm(algorithm).verify(data: signing_input, signature: signature, verification_key: key)
end