Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

What does Authentication Data define?

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Licensing Support
View previous topic :: View next topic  
Author Message
Richard



Joined: 14 Nov 2019
Posts: 18
Location: Norfolk

PostPosted: Sat Nov 16, 2019 6:38 pm    Post subject: What does Authentication Data define? Reply with quote

Hi guys,
The ILS help explains what Product Info defines -- the features licensed or the version of software the license applies to, but does not say anything about what Authentication Data is or does. Please give a clear explanation of what Authentication Data defines and please give an example of it. Thanks.
Quote:
The Product Info is text information that embedded in the encrypted license key. This may define the features licensed or the version of software the license applies to. The application can obtain this string from the ProductInfo property after obtaining a valid license. ...
For authenticated licenses you can also specify an Expiry Date and Authentication Data for the license key. This data is uploaded to the Authentication Server and downloaded by the application when the license key is authenticated. The application can obtain these values from the AuthenticationData and ExpiryDate properties after the license is authenticated.
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Sun Nov 17, 2019 10:37 pm    Post subject: Reply with quote

You can use Authentication Data for whatever you want. Typically if you are using Authenticated Licenses you are better off using AuthenticationData rather than ProductInfo - because you can change the AuthenticationData for an existing license key and it does not increase the length of the key (like ProductInfo does). Authentication can either be a single value or you can use it to store a structured XML snippet which might include multiple pieces of data
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Richard



Joined: 14 Nov 2019
Posts: 18
Location: Norfolk

PostPosted: Mon Nov 18, 2019 7:49 pm    Post subject: Reply with quote

Infralution wrote:
You can use Authentication Data for whatever you want. Typically if you are using Authenticated Licenses you are better off using AuthenticationData rather than ProductInfo - because you can change the AuthenticationData for an existing license key and it does not increase the length of the key (like ProductInfo does). Authentication can either be a single value or you can use it to store a structured XML snippet which might include multiple pieces of data
Thanks.
1, Do you have examples of how to use Authentication Data?
2, How to "store a structured XML snippet which might include multiple pieces of data"? Please give an example too. Thanks.
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Tue Nov 19, 2019 2:57 am    Post subject: Reply with quote

The custom generator project shows how to generate formatted XML AuthenticationData from user input in a License Tracker plugin. It creates AuthenticationData like:

Code:

<LicenseData>
    <LicensedTo>John Smith<LicensedTo/>
    <NumProcessors>2</NumProcessors>
</LicenseData>


The CustomAuthenticated Application shows how to read this authentication data.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Richard



Joined: 14 Nov 2019
Posts: 18
Location: Norfolk

PostPosted: Tue Nov 19, 2019 4:08 am    Post subject: Reply with quote

The (default) Authentication Data box under Key Generation requires formatted XML (in other words, put formatted XML in the (default) Authentication Data box), right?
But does not need XML declaration; the Root Element is <LicenseData> rather than <AuthenticationData>. Am I right?

Quote:
The CustomAuthenticated Application shows how to read this authentication data.
I saw Custom Authenticated Application under your Sample Projects, but I have not found where it is in your License Tracker yet. I'd like to see how it works before I compile it and add it to the License Tracker.
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Tue Nov 19, 2019 6:53 am    Post subject: Reply with quote

Quote:
The (default) Authentication Data box under Key Generation requires formatted XML


No you don't have to use XML. If you just want to use it to store a single piece of data (eg a customer name) then you can just enter that directly. If you want to store multiple pieces of data then XML is convenient and makes it easier for your code to be upgraded in the future to handle additional data.

The Custom Authenticated Application is just a sample project that shows how to build an application that uses AuthenticationData from a license.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Richard



Joined: 14 Nov 2019
Posts: 18
Location: Norfolk

PostPosted: Tue Nov 19, 2019 9:06 pm    Post subject: Reply with quote

Quote:
No you don't have to use XML. If you just want to use it to store a single piece of data (eg a customer name) then you can just enter that directly. If you want to store multiple pieces of data then XML is convenient and makes it easier for your code to be upgraded in the future to handle additional data.
So if I want to store multiple pieces of data, I have to put formatted XML in the (default) Authentication Data box, right?
Code:
The Custom Authenticated Application is just a sample project that shows how to build an application that uses AuthenticationData from a license.
I have already run the sample and I am still in the process of studying it. By the way, How is the number of processors relevant to the license of an app?
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Tue Nov 19, 2019 9:48 pm    Post subject: Reply with quote

Quote:
So if I want to store multiple pieces of data, I have to put formatted XML in the (default) Authentication Data box, right?

You don't have to - its just one option. You could choose to delimit different bits of data with semi-colons eg Option1;Option2. You also don't have to enter data directly in the box - if you define a Custom Generator then this allows you to create your own user interface to have the user enter the data and the Custom Generator then takes this and generates the Authentication Data. The Custom Generator sample project demonstrates how to do this.

Quote:
By the way, How is the number of processors relevant to the license of an app?
It's just an example. Some applications might want to limit the number of processors that the application will utilize based on the license.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Richard



Joined: 14 Nov 2019
Posts: 18
Location: Norfolk

PostPosted: Tue Nov 19, 2019 10:52 pm    Post subject: Reply with quote

Quote:
You could choose to delimit different bits of data with semi-colons eg Option1;Option2.

You mean, instead of putting data in the (default) Authentication Data box as follows
Code:
<LicenseData>
    <LicensedTo>John Smith<LicensedTo>
    <NumProcessors>2</NumProcessors>
</LicenseData>

I can put
Code:
John Smith;
2
But there are no keys or tags to be associated with these values. How does ILS know what to assign them to?
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Wed Nov 20, 2019 12:33 am    Post subject: Reply with quote

Quote:
But there are no keys or tags to be associated with these values. How does ILS know what to assign them to?


ILS doesn't do anything with this data it just allows your code to get the AuthenticationData as a string. It is up to your code to read and interpret it. If it is formatted as XML then your code can use standard XML parsing libraries to read it. If you use semi-colon delimiters then your code can use String.Split to split the string based on semi-colons and interpret the data based on position.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Richard



Joined: 14 Nov 2019
Posts: 18
Location: Norfolk

PostPosted: Wed Nov 20, 2019 1:50 am    Post subject: Reply with quote

Got it! Thank you.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Licensing Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group