cs_optimize_txz
guange 9 years ago
parent 250ed8c981
commit e9834f108a

@ -27,7 +27,8 @@ class SsoController < ApplicationController
def parse(auth) def parse(auth)
crypted_str = Base64.decode64(auth) crypted_str = Base64.decode64(auth)
pkey = OpenSSL::PKey::RSA.new(File.new(File.join(Rails.root,"config/private.key"))) pkey = OpenSSL::PKey::RSA.new(File.new(File.join(Rails.root,"config/private.key")))
content = pkey.private_decrypt(pwd,OpenSSL::PKey::RSA::NO_PADDING) # content = pkey.private_decrypt(pwd,OpenSSL::PKey::RSA::NO_PADDING)
content = pkey.private_decrypt(crypted_str)
JSON.parser(content) JSON.parser(content)
end end

Loading…
Cancel
Save