|
|
@ -34,7 +34,7 @@ class SsoController < ApplicationController
|
|
|
|
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(crypted_str,OpenSSL::PKey::RSA::PKCS1_PADDING)
|
|
|
|
content = pkey.private_decrypt(crypted_str,OpenSSL::PKey::RSA::PKCS1_PADDING)
|
|
|
|
# content = pkey.private_decrypt(crypted_str)
|
|
|
|
# content = pkey.private_decrypt(crypted_str)
|
|
|
|
JSON.parser(content)
|
|
|
|
ActiveSupport::JSON.decode(content)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
def login(id)
|
|
|
|
def login(id)
|
|
|
|