Reputation: 20997
Say I have some Form's authentication Cookie:
FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(1,
"TESTTEST",
DateTime.Now,
DateTime.Now.AddMinutes(30),
false,
String.Empty,
FormsAuthentication.FormsCookiePath);
Normally in C# we can decrypt this like so:
var authToken = FormsAuthentication.Decrypt(authCookie.Value);
I'm creating a tool for testing an I want to decrypt the cookie on the client-side.
If my machine key is: GHFDK45sDFGSKj234 How can I decrypt the Authentication from Javascript?
Upvotes: 1
Views: 2701
Reputation: 718
First you need to know the algorithm that the forms authentication is using. Then you need to find a javascript library that can decrypt that algorithm
Upvotes: 1