Closed r-brown closed 7 years ago
Done in Labs64/NetLicensing-Demo@150935b A little remade the setup/validate form, I think you should like it.
Validation on not existing licensee returns
Validation - Error
Undefined offset: 1
UPD: as well as existing
How to reproduce:
$ curl -X POST --header 'Content-Type: application/x-www-form-urlencoded' --header 'Accept: application/xml' --header 'Authorization: Basic ZGVtbzpkZW1v' 'https://go.netlicensing.io/core/v2/rest/licensee/L-69761077/validate'
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:netlicensing xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:ns2="http://netlicensing.labs64.com/schema/context" ttl="2017-07-14T04:18:17.439Z">
<ns2:infos/>
<ns2:items>
<ns2:item type="ProductModuleValidation">
<ns2:property name="productModuleNumber">PM-64160267</ns2:property>
<ns2:property name="valid">true</ns2:property>
<ns2:property name="expires">2017-07-24T04:16:39.152Z</ns2:property>
<ns2:property name="productModuleName">Module licensed under Subscription licensing model</ns2:property>
<ns2:property name="licensingModel">Subscription</ns2:property>
</ns2:item>
</ns2:items>
</ns2:netlicensing>
$ curl -X POST --header 'Content-Type: application/x-www-form-urlencoded' --header 'Accept: application/xml' --header 'Authorization: Basic ZGVtbzpkZW1v' 'http://localhost:8888/rest/licensee/L-69761077/validate'
<?xml version="1.0" encoding="UTF-8"?>
<ns3:netlicensing xmlns:ns2="http://www.w3.org/2000/09/xmldsig#" xmlns:ns3="http://netlicensing.labs64.com/schema/context" ttl="2017-07-14T04:23:27.753Z">
<ns3:infos/>
<ns3:items>
<ns3:item type="ProductModuleValidation">
<ns3:property name="productModuleNumber">PM-64160267</ns3:property>
<ns3:property name="valid">true</ns3:property>
<ns3:property name="expires">2017-07-24T04:16:39.152Z</ns3:property>
<ns3:property name="productModuleName">Module licensed under Subscription licensing model</ns3:property>
<ns3:property name="licensingModel">Subscription</ns3:property>
</ns3:item>
</ns3:items>
</ns3:netlicensing>
it works
doesn't work
Local configuration at .env
# NetLicensing Connection
# NetLicensing Core URL; default: https://go.netlicensing.io/core/v2/rest
NLIC_BASE_URL=https://go.netlicensing.io/core/v2/rest
# (optional) NetLicensing Agent URL; e.g. http://localhost:8888/rest
NLIC_AGENT_BASE_URL=http://localhost:8888/rest
# NetLicensing Auth
NLIC_AUTH_USERNAME=demo
NLIC_AUTH_PASSWORD=demo
NLIC_AUTH_API_KEY=73ed204b-155f-4513-a349-77d34774ccaf
I WANT TO CONNECT FROM A CONTAINER TO A SERVICE ON THE HOST
The Mac has a changing IP address (or none if you have no network access). From 17.06 onwards our recommendation is to connect to the special Mac-only DNS name
docker.for.mac.localhost
which will resolve to the internal IP address used by the host.
On MAC OS following NetLicensing Agent configuration need to be used:
NLIC_AGENT_BASE_URL=http://docker.for.mac.localhost:8888/rest
NetLicensing Demo cannot be used with NetLicensing Agent at the moment. No error messages are shown to the user as well.
How to reproduce:
import assets locally
$ java -jar netlicensing-agent-2.3.7-ALPHA1.jar --action=import-assets
start NetLicensing Agent
$ java -jar netlicensing-agent-2.3.7-ALPHA1.jar --action=run-agent-offline --agent.port=8888
NetLicensing configuration
NLIC_AGENT_BASE_URL=http://localhost:8888/rest