license for master
This commit is contained in:
@@ -38,13 +38,13 @@ class ApplicationController < ActionController::Base
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def current_license(url, key)
|
def current_license(url, subdomain)
|
||||||
@license = License.new(url, key)
|
@license = License.new(url, subdomain)
|
||||||
|
|
||||||
##creating md5 hash
|
##creating md5 hash
|
||||||
md5_hostname = Digest::MD5.new
|
md5_hostname = Digest::MD5.new
|
||||||
md5key = md5_hostname.update(request.host)
|
md5key = md5_hostname.update(request.host)
|
||||||
if (@license.detail_with_local_cache(key, md5key.to_s) == true)
|
if (@license.detail_with_local_cache(subdomain, md5key.to_s) == true)
|
||||||
#if (@license.detail == true)
|
#if (@license.detail == true)
|
||||||
|
|
||||||
return @license
|
return @license
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ class License
|
|||||||
if cache_license.nil?
|
if cache_license.nil?
|
||||||
##change the d/e key
|
##change the d/e key
|
||||||
# @options = { query: {device: "SXlite", lookup: lookup, skey: @secret, token: SECRETS_CONFIG['provision_key']} }
|
# @options = { query: {device: "SXlite", lookup: lookup, skey: @secret, token: SECRETS_CONFIG['provision_key']} }
|
||||||
@params = { query: { device: "SXlite", token: SECRETS_CONFIG['provision_key']} }
|
@params = { query: { lookup_type: "cloud", lookup: lookup, encrypted_key: SECRETS_CONFIG['provision_key']} }
|
||||||
|
|
||||||
response = self.class.get("/request_license", @params)
|
response = self.class.get("/request_license", @params)
|
||||||
@license = response.parsed_response
|
@license = response.parsed_response
|
||||||
|
|||||||
Reference in New Issue
Block a user