module Morpho::Cipher
Public Instance Methods
jwt_decode(token, algorithm = Morpho.config.jwt.algorithm)
click to toggle source
# File lib/morpho/cipher.rb, line 9 def jwt_decode(token, algorithm = Morpho.config.jwt.algorithm) ::JWT.decode(token, Morpho.config.jwt.secret, true, algorithm: algorithm) end
jwt_encode(payload, algorithm = Morpho.config.jwt.algorithm)
click to toggle source
# File lib/morpho/cipher.rb, line 5 def jwt_encode(payload, algorithm = Morpho.config.jwt.algorithm) ::JWT.encode(payload, Morpho.config.jwt.secret, algorithm) end