Skip to content

Commit 34b1196

Browse files
author
R.Brown
committed
LMB-719 fix token APIKey deactivation
1 parent b4cc90a commit 34b1196

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

NetLicensingClient-demo/NetLicensingClient-demo.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,8 +276,12 @@ static void Main(string[] args)
276276
{
277277
// Cleanup:
278278
context.securityMode = SecutiryMode.BASIC_AUTHENTICATION;
279-
// deactivate api key
280-
TokenService.deactivate(context, context.apiKey);
279+
280+
// deactivate api key in case APIKey was used (exists)
281+
if (!String.IsNullOrEmpty(context.apiKey))
282+
{
283+
TokenService.deactivate(context, context.apiKey);
284+
}
281285
// delete test product with all its related items
282286
ProductService.delete(context, demoProductNumber, true);
283287
}

0 commit comments

Comments
 (0)