add pdf viewer and test doemal
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
class Api::ApiController < ActionController::API
|
||||
include TokenVerification
|
||||
|
||||
before_action :lookup_domain
|
||||
# before_action :lookup_domain
|
||||
helper_method :current_token, :current_login_employee, :get_cashier
|
||||
|
||||
private
|
||||
|
||||
@@ -13,12 +13,12 @@ module TokenVerification
|
||||
authenticate_token || render_unauthorized
|
||||
end
|
||||
|
||||
def authenticate_token
|
||||
def authenticate_token
|
||||
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
|
||||
from = "local" #request.subdomain.downcase + "." + request.domain.downcase
|
||||
aes = MyAesCrypt.new
|
||||
return aes.checkKeyForAuth(from, token)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user