开发者

MVC Authentication flow query

I am writing a small app to allow users to update their personal开发者_开发百科 information online.

I get them to Authenticate at the start of the process, but would like also to ask them again for their password just before I submit any changes back to the database.

This is the way Amazon works before allowing you to see your basket and checkout.

Is there a sensible way of doing this?


It kind of depends what your using as a membership provider...

Lets assume you are using System.Web.Security.MembershipProvider then you need to use the ValidateUser method....

MembershipProvider _provider =  Membership.Provider;

if (_provider.ValidateUser(username,password)){


...the test has passed
}

I'm also assuming SSL is in place....which would be good practise.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜