order reservation updated

This commit is contained in:
phyusin
2018-04-12 14:28:44 +06:30
parent b4ccd02fc2
commit 4137026c16
7 changed files with 319 additions and 122 deletions

View File

@@ -17,11 +17,12 @@ module TokenVerification
authenticate_with_http_token do |token, options|
# Rails.logger.debug "token - " + token.to_s
if(options.length !=0 && options["from"] == "DOEMAL")
if(ENV["SERVER_MODE"] === "cloud")
from = request.subdomain.downcase + "." + request.domain.downcase
aes = MyAesCrypt.new
return aes.checkKeyForAuth(from, token)
end
# if(ENV["SERVER_MODE"] === "cloud")
# from = request.subdomain.downcase + "." + request.domain.downcase
# aes = MyAesCrypt.new
# return aes.checkKeyForAuth(from, token)
# end
return true
end
@user = Employee.authenticate_by_token(token)