request key

This commit is contained in:
Yan
2018-01-12 18:11:52 +06:30
parent 999a46f41d
commit ad4be54ef2
4 changed files with 9 additions and 9 deletions

View File

@@ -38,11 +38,11 @@ class ApplicationController < ActionController::Base
end
else
# check for license file
if check_license
current_license(ENV["SX_PROVISION_URL"])
else
redirect_to activate_path
end
# if check_license
# current_license(ENV["SX_PROVISION_URL"])
# else
# redirect_to activate_path
# end
end
end

View File

@@ -233,13 +233,13 @@ class License
def get_key
api_token = read_license_no_decrypt("api_token")
shop_name = read_license_no_decrypt("shop_name")
@params = { query: {lookup_type: "application", api_token: api_token} }
@params = { query: {lookup_type: "application", api_token: api_token } }
response = self.class.get("/get_key", @params)
@data = response.parsed_response
if (@data["status"])
##Check from local redis - if available load local otherwise get from remote
cache_key = "shop:#{shop_name}"
cache_key = "shop:#{shop_name.chomp}"
cache_license = nil

View File

@@ -8,7 +8,7 @@ dbhost: nk57NaR38B2eSYyron3Nbw==
dbschema: 3orxFaTi0uQhatBqZGiitQ==
dbusername: EtMle9Gr0/PE3NFHHfwo5A==
dbpassword: 86h61/O38GGo64nekz6oeA==
api_token: FVAGMnjVdaScfydXMbMvPPRWnkEwCSuxs
api_token: RZbpyAZlwOYFZfzbWmFhZgwCzRwJTBnPKIHrfM
app_token: IoXPdqzbnQWbHsnxLAjMjimnjEJNySOeIo
plan_sku: PyQJ2sk5NZTudqQ2YIU16A==
renewable_date: d/Fk1deU/iPbZFDOdyKsjA==

View File

@@ -12,7 +12,7 @@
development:
secret_key_base: b61d85f8ed2a1a9e0eeece3443b3e8f838d002cc1d9f32115d8e93db920e2957adfedc57501d44741211538f3108b742cdeada87d5bfae796c53da1f90a3cd61
sx_provision_url: connect.smartsales.dev//api #connect.smartsales.asia/api #provision.zsai.ws/api
sx_provision_url: 192.168.1.182:3002/api #connect.smartsales.asia/api #provision.zsai.ws/api
server_mode: application
cipher_type: AES-256-CBC
sx_key: Wh@t1$C2L