newbie CSLA authentication

newbie CSLA authentication

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


griff posted on Wednesday, September 10, 2008

Hi

I am building a web site and intially used the aspsql provider that MS provides.  This seems to have a fair amount of functionality.  Then I remembered csla and the ptmembership/ptindentity classes.  I'm now confused -

1) do these classes replace the functionality of the aspsql membership provider or compliment it?

2) if csla replaces then do I now have to re-code all the functionlity that came with it (e.g UserInRoles, GetUserByName, UnlockUser, GetAllusers (stored procs) and so on) into my own csla classes.

I'm confused.....how does the csla ptmembership fit with the aspsql membership provider?

Many thanks

Richard

SonOfPirate replied on Wednesday, September 10, 2008

Richard,

Hopefully you've read Rocky's book.  If not, I recommend doing so as he explains the logic behind his design decisions pretty well.

In this case, the PtMembershipProvider is used instead of the built-in SqlMembershipProvider.  The PtMembershipProvider provides the connection to the PtPrincipal and PtIdentity classes.

Remember that the built-in SqlMembershipProvider is designed to work directly with the ASPNET database schema and does not use business objects whereas CSLA has the business objects, such as BusinessPrincipalBase, handle all interaction with the back-end data store.  So, there is a fundamental difference in the way to the two providers work.  To fully implement a membership provider that leverages CSLA BO's, you will have to implement all of the methods yourself.  This is because you will want your provider to delegate to your business objects when performing each operation and, most likely, you'll be returning your business objects instead of the built-in classes that would be returned by the SqlMembershipProvider.

Make sense?  HTH

 

griff replied on Wednesday, September 10, 2008

Hi,

thanks for the reply, I haven't time to respond in full at this moment, but will asap and maybe await further discussion.

Copyright (c) Marimer LLC