This commit is contained in:
@@ -9,18 +9,18 @@ module TokenVerification
|
||||
|
||||
protected
|
||||
# Authenticate the user with token based authentication
|
||||
def authenticate
|
||||
def authenticate
|
||||
authenticate_token || render_unauthorized
|
||||
end
|
||||
|
||||
def authenticate_token
|
||||
authenticate_with_http_token do |token, options|
|
||||
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 #"local"
|
||||
aes = MyAesCrypt.new
|
||||
return aes.checkKeyForAuth(from, token)
|
||||
return aes.checkKeyForAuth(from, token)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user