Custom Login-Provider

This is an open forum for any mojoPortal topics that don't fall into the other categories.

This thread is closed to new posts. You must sign in to post in the forums.
11/8/2009 6:55:08 AM
Gravatar
Total Posts 2

Custom Login-Provider

Hello to All!

I'm just getting started modifying mojoPortal to fit our specific needs - so please apologize if my question is stupid.

According to another post of Joe I would like to "inject" my own authentication provider by doing a post-build copy of the /Web/Security/Login.aspx - file.
But first I think I need to unterstand, how the default mojoPortal-Authentication works, but I cannot find any event-handler for the btnLogin - Button which processes the user input and verify this data against the database. Where is this all happening? And how does the "AuthHandlerHttpModule" get into this?

I would appreciate I someone could direct me to the right way. Is there any structure-diagram of the code? Any description?

Thanks a lot!

 

Best Regards,
Daniel Lang

11/8/2009 7:25:07 AM
Gravatar
Total Posts 18439

Re: Custom Login-Provider

Hi Daniel,

We are basically using the built in ASP.NET CreateUserWizard and Login, and PasswordRecovery controls. These controls interact with the mojoMembershipProvider which is our implementation of ASP.NET MembershipProvider.

For a custom solution you would be bypassing the membership provider completely. Basic steps you would need to do is.

1. Validate the credentials according to your own methods, a web service or whatever.

2. If valid you would ensure that there is an existing mojoPortal SiteUser corresponding to the login, if not you would create a SiteUser. There is exampel code that does this check and creates users when using Windows Authentication if you look in Web/Components/AuthHandlerHttpModule.cs

3. To log the user in you basically would call FormsAuthentication.SetAuthCookie or FormsAuthentciation.RedirectFromLogin (google for info on those methods.)

Hope it helps,

Joe

You must sign in to post in the forums. This thread is closed to new posts.