I'm trying to implement persistent logins between two web projects. The requirements I'm working with require persistent login between a Silverlight project and a Web App using HTML5/CSS3/JQuery/C#. The Silverlight project already exists, and I'm building the Web App.
The problem I'm having is that the Silverlight project has existing persistent login functionality that I have to recreate in the project I'm working on, so that the user is not required to login several times when navigating between the two projects.
The way the existing functionality works is when a user navigates to a new page, it takes the current login information, and puts into a string, like such:
user=username&pass=password which is then encrypted, and attached to the URI of the page being navigated to. The page being navigated to then does the opposite; decrypts the information contained in its URI, and uses that to login.
The thing is, I have JQuery taking care of the navigation process in the Web app, so that it can call a WebMethod that takes care of encryption/decryption. In order to build an encrypted string to attach to the new pages URI, I need to access the username and password originally entered during login, which is stored in a Sys.Services.AuthenticationService object in the following way:
var ssa = Sys.Services.AuthenticationService; ssa.login(username, password, isPersistent, customInfo, redirectUrl, onLoginComplete, onLoginError); Is there a way to access the username and password from the AuthenticationService object after it's created? I could do something silly like store them in a global variable during initial login, but that's not exactly the most secure solution.
No comments:
Post a Comment
Send us your comment related to the topic mentioned on the blog