Hi Jerry.

You can define a db object to connect just to your auth table on MS SQL.
This way, you can customize Auth to your needs.

Remember web2py, by default, store passwords crypted (see CRYPT validator). If it's not your scenario, you'll need to override this implementation.

A few months ago I needed to customize Auth. I inherited from the original and implemented my own methods like loging user in without password (in a very special situation), and registering them making integration with other tables.

By the way, you'll need to check if the web2py RBAC is enough for you. Maybe you'll have to make it use tables used today by your legacy system.

So, I recommend you to customize Auth and enjoy all web2py authentication and authorization infrastructure.

--
Vinicius Assef



On 07/05/2012 06:04 PM, Jerry wrote:
Hello,

We have a legacy Cold Fusion app running off a MS SQL db server and plan
to gradually move functionality from CF to web2py.
Both systems will run concurrently, accessing the same db.
Thanks to the web2py (awesome piece of software! thank you Massimo and
the other contributors!) DAL, we can access the legacy database no problem.

The db has a User table with fields like:
FirstName, LastName, Email, Password etc.
The field names do not match the names used in web2py
auth.settings.table_user_name (first_name, last_name, email, passwd etc.)

We would love to use web2py Auth for login/register/profile forms,
decoration of controller actions with @auth, and handling password resets.

It looks like there will be a lot of customization of the Auth settings
to get it to work with our legacy database.
The only alternative I can think of is not using Auth at all. Everything
custom - our own login form, register page, password reset - and we
don't get @auth. decorators.

What would you recommend? I'm guessing this has been done before but I
haven't found a solution.
Is there another way of doing this that makes more sense?

Thanks in advance,

Jerry.

Reply via email to