token checked for doemal
This commit is contained in:
@@ -17,12 +17,11 @@ module TokenVerification
|
|||||||
authenticate_with_http_token do |token, options|
|
authenticate_with_http_token do |token, options|
|
||||||
# Rails.logger.debug "token - " + token.to_s
|
# Rails.logger.debug "token - " + token.to_s
|
||||||
if(options.length !=0 && options["from"] == "DOEMAL")
|
if(options.length !=0 && options["from"] == "DOEMAL")
|
||||||
# if(ENV["SERVER_MODE"] === "cloud")
|
if(ENV["SERVER_MODE"] === "cloud")
|
||||||
# from = request.subdomain.downcase + "." + request.domain.downcase
|
from = request.subdomain.downcase + "." + request.domain.downcase
|
||||||
# aes = MyAesCrypt.new
|
aes = MyAesCrypt.new
|
||||||
# return aes.checkKeyForAuth(from, token)
|
return aes.checkKeyForAuth(from, token)
|
||||||
# end
|
end
|
||||||
return true
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@user = Employee.authenticate_by_token(token)
|
@user = Employee.authenticate_by_token(token)
|
||||||
|
|||||||
Reference in New Issue
Block a user