Class: Doorkeeper::Easyship::TokenGenerator

Inherits:
Object
  • Object
show all
Defined in:
lib/doorkeeper/jwt_assertion.rb

Class Method Summary collapse

Class Method Details

.generate(options = {}) ⇒ Object



77
78
79
# File 'lib/doorkeeper/jwt_assertion.rb', line 77

def self.generate(options = {})
  "#{::Rails.env[0..3]}_" + Base64.strict_encode64(OpenSSL::HMAC.digest(OpenSSL::Digest.new('sha256'), SecureRandom.hex, options.to_s))
end