doemal or other api token added
This commit is contained in:
@@ -13,16 +13,16 @@ module TokenVerification
|
||||
authenticate_token || render_unauthorized
|
||||
end
|
||||
|
||||
def authenticate_token
|
||||
authenticate_with_http_token do |token, options|
|
||||
def authenticate_token
|
||||
authenticate_with_http_token do |token, options|
|
||||
# Rails.logger.debug "token - " + token.to_s
|
||||
if(!options.from.nil? && options.from == "DOEMAL"){
|
||||
if(ENV["SERVER_MODE"] === "cloud"){
|
||||
from = request.subdomain.downcase + "." + request.domain.downcase
|
||||
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
|
||||
end
|
||||
|
||||
@user = Employee.authenticate_by_token(token)
|
||||
if @user
|
||||
|
||||
Reference in New Issue
Block a user