From b12d4b8bf85752210f9d560a23a6fc6d946e828c Mon Sep 17 00:00:00 2001 From: phyusin Date: Thu, 12 Apr 2018 14:30:25 +0630 Subject: [PATCH] token checked for doemal --- app/controllers/concerns/token_verification.rb | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/app/controllers/concerns/token_verification.rb b/app/controllers/concerns/token_verification.rb index 34570ee1..2c17e258 100755 --- a/app/controllers/concerns/token_verification.rb +++ b/app/controllers/concerns/token_verification.rb @@ -17,12 +17,11 @@ 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 - return true + if(ENV["SERVER_MODE"] === "cloud") + from = request.subdomain.downcase + "." + request.domain.downcase + aes = MyAesCrypt.new + return aes.checkKeyForAuth(from, token) + end end @user = Employee.authenticate_by_token(token)