Login using a View

Topics: Prism v2 - Silverlight 2
Apr 4, 2009 at 12:34 AM
Has anyone implemented a forms authentication login using a View?  I'm at the point right now where I've created the authentication service, a presentation model and view for the Login, but I'm at an impasse for how I'm going to fit it in to the workflow. 
Apr 4, 2009 at 9:39 PM
Hi!

We've implemented this functionality. I try to summarize the approach what we took in our silverlight solution:

- We've implmenented a view and a viewmodel (username, password, ispersistent properties) and encapsulated this functionality into a module.
- We've defined 3 events, one of them is LoginRequested. This event is raised in 2 generic places: at app start early stage in shell initialization (because we've security trimmed UI) and raised from our WCF message inspector which is responsible to handle securityexceptions received from the server side.
- Your controller is subscribing to the LoginRequested event and present (in our case a dedicated popup region) the login view. and after a successful login your controller raising the LoginSuccessful event.

It's not that complicated, I hope my write-up is clear, if not, then just ask :-)

I'm very curious about other's approach.

Thanks,
Attila