I am trying to implement a MVVM pattern for my website's login function.
The site returns with status code 401 when authentication fails. The goal would be to:
The site returns with status code 401 when authentication fails. The goal would be to:
- Update my view model to indicate that the user is not authenticated. Example: viewModel.set("authenticated", false)
- When authenticated is false, display a Kendo window with the username/password prompt
- Then the user presses submit within this window, fire my login method
Everything works except I am having the following problems:
- I can't find a way to bind the open/close state of the Kendo window (my login window) to the authenticated property of my viewModel
- When I bind to the input of type password, it seems to be one-way. I am able to get the password the user typed in and pass this up to my web method, but during the login function I clear the password viewModel.set("password", "") but the input control does not update. If I change it to a regular input with type text it seems to work.