Module: JWT::JWA::Compat::ClassMethods Private

Defined in:
lib/jwt/jwa/compat.rb

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Instance Method Details

#from_algorithm(algorithm) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



10
11
12
# File 'lib/jwt/jwa/compat.rb', line 10

def from_algorithm(algorithm)
  new(algorithm)
end

#sign(algorithm, msg, key) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



14
15
16
17
18
# File 'lib/jwt/jwa/compat.rb', line 14

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) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



20
21
22
23
24
# File 'lib/jwt/jwa/compat.rb', line 20

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