Validate new AD password according to local security policy?

后端 未结 2 1796
南旧
南旧 2021-01-22 11:19

I would like to allow the current user to change their password (managed via active directory).

I would like to validate and then set their password in Active Directory

2条回答
  •  醉酒成梦
    2021-01-22 12:01

    Imho, you can better use ChangePassword than SetPassword. That way, you require the user to specify his current (old) password. That may be interesting, because you can never be 100% sure that the user who is browsing your site is actually the user who is logged in.

    Here's a link with more information: http://www.primaryobjects.com/CMS/Article66.aspx

    You do not have to validate the password in advance. Just send it to AD in a try-catch, and if it's not validated, the reason why will be in the exception message.

提交回复
热议问题