Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

85 lines
2.1 KiB

  1. ///////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 2000, Microsoft Corp. All rights reserved.
  4. //
  5. // FILE
  6. //
  7. // changepwd.h
  8. //
  9. // SYNOPSIS
  10. //
  11. // Declares the class ChangePassword.
  12. //
  13. ///////////////////////////////////////////////////////////////////////////////
  14. #ifndef CHANGEPWD_H
  15. #define CHANGEPWD_H
  16. #include <iastl.h>
  17. namespace IASTL
  18. {
  19. class IASRequest;
  20. }
  21. ///////////////////////////////////////////////////////////////////////////////
  22. //
  23. // CLASS
  24. //
  25. // ChangePassword
  26. //
  27. // DESCRIPTION
  28. //
  29. // Implements the MS-CHAP Change Password handler.
  30. //
  31. ///////////////////////////////////////////////////////////////////////////////
  32. class ATL_NO_VTABLE ChangePassword
  33. : public IASTL::IASRequestHandlerSync,
  34. public CComCoClass<ChangePassword, &__uuidof(ChangePassword)>
  35. {
  36. public:
  37. IAS_DECLARE_REGISTRY(ChangePassword, 1, 0, IASTypeLibrary)
  38. // IIasComponent
  39. STDMETHOD(Initialize)();
  40. STDMETHOD(Shutdown)();
  41. private:
  42. virtual IASREQUESTSTATUS onSyncRequest(IRequest* pRequest) throw ();
  43. static bool tryMsChapCpw1(
  44. IASTL::IASRequest& request,
  45. PCWSTR domainName,
  46. PCWSTR username,
  47. PBYTE challenge
  48. );
  49. static bool tryMsChapCpw2(
  50. IASTL::IASRequest& request,
  51. PCWSTR domainName,
  52. PCWSTR username,
  53. PBYTE challenge
  54. );
  55. static void doMsChapCpw(
  56. IASTL::IASRequest& request,
  57. PCWSTR domainName,
  58. PCWSTR username,
  59. IAS_OCTET_STRING& msChapChallenge
  60. );
  61. static void doMsChap2Cpw(
  62. IASTL::IASRequest& request,
  63. PCWSTR domainName,
  64. PCWSTR username,
  65. IAS_OCTET_STRING& msChapChallenge
  66. );
  67. static void doChangePassword(
  68. IASTL::IASRequest& request,
  69. DWORD authType
  70. );
  71. };
  72. #endif // CHANGEPWD_H