View previous topic :: View next topic |
Author |
Message |
Happs
Joined: 13 Jul 2011 Posts: 62 Location: Sydney, Australia
|
Posted: Tue Dec 09, 2014 10:14 am Post subject: |
|
|
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 |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Tue Dec 09, 2014 10:36 am Post subject: |
|
|
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 |
|
|
Happs
Joined: 13 Jul 2011 Posts: 62 Location: Sydney, Australia
|
Posted: Wed Dec 10, 2014 2:20 am Post subject: |
|
|
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 |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Wed Dec 10, 2014 2:32 am Post subject: |
|
|
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 |
|
|
Happs
Joined: 13 Jul 2011 Posts: 62 Location: Sydney, Australia
|
Posted: Wed Dec 10, 2014 2:56 am Post subject: |
|
|
Thanks |
|
Back to top |
|
|
Happs
Joined: 13 Jul 2011 Posts: 62 Location: Sydney, Australia
|
Posted: Tue Dec 16, 2014 7:17 am Post subject: |
|
|
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
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 |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Tue Dec 16, 2014 10:04 am Post subject: |
|
|
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 |
|
|
|