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 

Reauthenticate license with data
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Infralution Support Forum Index -> Licensing Support
View previous topic :: View next topic  
Author Message
Happs



Joined: 13 Jul 2011
Posts: 62
Location: Sydney, Australia

PostPosted: Tue Dec 09, 2014 10:14 am    Post subject: Reply with quote

Quote:

If you have purchased the Authentication Server source code then the AuthenticationService.asmx.cs file has a GetAuthenticationData method which you can change to save the application data into the licenceKey.AuthenticationData and return that.


We have purchased the source code few years ago, already using ILS in another product.

My initial testing without modifying the server code shows the GetAuthenticationData() method not returning any value when we pass the authenticated key, works fine when original license key provided.

Code:

_license = _licenseProvider.GetLicense();

//Success, Original license key from the license tracker
var value = _licenseProvider.GetAuthenticationData("B7D4-xxx-BA86");
MessageBox.Show("Success: " + value);

// Failed, no value returned
value = _licenseProvider.GetAuthenticationData(_license.LicenseKey);
MessageBox.Show("Failed: " + value);


Documentation says provide the authenticated key. Do you reproduce the same behaviour?

Thanks
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Tue Dec 09, 2014 10:36 am    Post subject: Reply with quote

The _license.LicenseKey value is not the authentication key that the user enters. It is an encrypted version of that key. The AuthenticatedLicenseProvider.GetAuthenticationData method is intended to allow your application to get the AuthenticationData for a key without actually authenticating it. This can be useful in some circumstances but it is NOT the GetAuthenticationData method I was referring to.

I think the source code you are looking at is just the application source code that we provide when you purchase an ILS developer license. The source code for the Authentication Service has to be purchased separately. It is the source code for the service running on your website. If you email your details to support@infralution.com then we can confirm whether or not you actually did purchase this in addition to your developer license.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Happs



Joined: 13 Jul 2011
Posts: 62
Location: Sydney, Australia

PostPosted: Wed Dec 10, 2014 2:20 am    Post subject: Reply with quote

Sorry about my last post, should have made it more clear.

Prior to my earlier post, followed your suggestions and updated the AuthenticationService.asmx.cs file, private GetAuthenticationData() method. Works as it sets the ApplicationData value to AuthenticationData. Here is a screencast of updated code: http://screencast.com/t/q8nAY2OFyPTD

Now in my solution, I can call ReauthenticateWithData() method to provide some application data which sets as authentication data.

However, I need to access the AuthenticationData after the key authenticated, it may not be in same sessions.

- How can I access the key that the user entered so I can pass it to GetAuthenticationData() method? I have tested DecryptAuthenticationKey() method but it does not return the key user entered.

- Is there another approach available where I can access the AuthenticationData by using encrypted key or license?

Thanks
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Wed Dec 10, 2014 2:32 am    Post subject: Reply with quote

If you reauthenticate the license (without setting the ApplicationData) then the license returned should contain the existing AuthenticationData and you can access this via the AuthenticatedLicense.AuthenticationData property.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Happs



Joined: 13 Jul 2011
Posts: 62
Location: Sydney, Australia

PostPosted: Wed Dec 10, 2014 2:56 am    Post subject: Reply with quote

Thanks Smile
Back to top
View user's profile Send private message
Happs



Joined: 13 Jul 2011
Posts: 62
Location: Sydney, Australia

PostPosted: Tue Dec 16, 2014 7:17 am    Post subject: Reply with quote

I want to update you that, changes to AuthenticationService.GetAuthenticationData() method to use the application data and set as AuthenticationData appear to be working. It meets our requirements where we can issue limited accounts key and our customer able to specify accounts and we can see in AuthenticationData for the key.

Thank you for your suggestions Smile

Our customer may need to define hundreds of accounts name in AuthenticationData, is there going to be any issues when the AuthenticationData contains large number of text? Any size limit of AuthenticationData?
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Tue Dec 16, 2014 10:04 am    Post subject: Reply with quote

There is a default limit of 4Mb on the maximum size of data that can be sent in a single HTTP request. So if your ApplicationData exceeded this you would have a problem with authenticating the license. You can however change this limit if required. See this MSDN page:

http://msdn.microsoft.com/en-au/library/e1f13641(v=vs.85).aspx
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Licensing Support All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
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