Is there any sample of Login Validation in Silverlight using csla 4 validation rules?

Is there any sample of Login Validation in Silverlight using csla 4 validation rules?

Old forum URL: forums.lhotka.net/forums/t/10276.aspx


OscarLauroba posted on Tuesday, April 19, 2011

CustomPrincipal inherits from BusinessPrincipalBase and not from BusinessBase, so How can I validate password, username, etc. and notify the user of the error messages using csla validation rules classes? Or isn't this the way to go?

JonnyBee replied on Tuesday, April 19, 2011

Create your own Editable object to hold username/password with validation.

Then add a "Login" method that cverifies the credentials and return the CustomPrincipal and set the ApplicationContext.User = customPrincipal.

OscarLauroba replied on Thursday, May 05, 2011

I hoped to find a login sample in the recent DataPortal book but in its page number 104 says that " a more complete example of the login process in the Using CSLA 4: Silverlight 4 and  WPF ebook".

Rocky, Do you have a schedule, please?

RockfordLhotka replied on Thursday, May 05, 2011

Jonny is correct, create a UserCredentials editable root object to bind to the login view. Then use that as your criteria for the CustomPrincipal BeginLogin method, and the CustomIdentity factory method, and the DataPortal_Fetch parameter. At least this is what I do in situations like this.

drudolph replied on Saturday, May 14, 2011

I want to use the BeginLogin method of my custom csla principal object in a WP7 app but I am not sure where to call it. In this scenario, the credentials are stored so I am not diplaying a login screen.

My authentication calls a web service asynchronously. Using the example in the ProjectTrackercs sample, BeginLogin has 2 parameters - user name and password. Should it have a third - a callback? I need to signal the WP7 app when the login is complete.

Should this be call in Application_Launching of the App object or in the MainViewModel?

Thanks!

Copyright (c) Marimer LLC