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.

117 lines
2.6 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. logon.h
  5. Abstract:
  6. This interface abstracts a Passport Logon Session.
  7. Author:
  8. Biao Wang (biaow) 01-Oct-2000
  9. --*/
  10. #ifndef LOGON_H
  11. #define LOGON_H
  12. class SESSION;
  13. class LOGON
  14. {
  15. public:
  16. LOGON(SESSION*, DWORD dwParentFlags);
  17. virtual ~LOGON(void);
  18. BOOL Open(PCWSTR pwszPartnerInfo);
  19. void Close(void);
  20. BOOL SetCredentials(
  21. PCWSTR pwszRealm,
  22. PCWSTR pwszTarget,
  23. PCWSTR pwszSignIn,
  24. PCWSTR pwszPassword
  25. );
  26. BOOL GetLogonHost(
  27. PWSTR pwszHostName,
  28. OUT PDWORD pdwHostNameLen
  29. ) const;
  30. DWORD Logon(void);
  31. BOOL GetChallengeInfo(
  32. HBITMAP** ppBitmap,
  33. PBOOL pfPrompt,
  34. PWSTR pwszCbText,
  35. PDWORD pdwTextLen,
  36. PWSTR pwszRealm,
  37. DWORD dwMaxRealmLen
  38. ) const;
  39. BOOL GetAuthorizationInfo(
  40. PWSTR pwszTicket, // e.g. "from-PP = ..."
  41. PDWORD pdwTicketLen,
  42. PBOOL pfKeepVerb, // if TRUE, no data will be copied into pwszUrl
  43. PWSTR pwszUrl, // user supplied buffer ...
  44. PDWORD pdwUrlLen // ... and length (will be updated to actual length
  45. // on successful return)
  46. ) const;
  47. VOID StatusCallback(
  48. IN HINTERNET hInternet,
  49. IN DWORD dwInternetStatus,
  50. IN LPVOID lpvStatusInformation,
  51. IN DWORD dwStatusInformationLength);
  52. protected:
  53. void GetCachedCreds(
  54. PCWSTR pwszRealm,
  55. PCWSTR pwszTarget,
  56. PCREDENTIALW** pppCreds,
  57. DWORD* pdwCreds
  58. );
  59. BOOL DownLoadCoBrandBitmap(
  60. PWSTR pwszChallenge
  61. );
  62. DWORD Handle401FromDA(
  63. HINTERNET hRequest,
  64. BOOL fTicketRequest
  65. );
  66. DWORD Handle200FromDA(
  67. HINTERNET hRequest
  68. );
  69. protected:
  70. SESSION* m_pSession;
  71. HINTERNET m_hConnect;
  72. BOOL m_fCredsPresent;
  73. PWSTR m_pwszSignIn;
  74. PWSTR m_pwszPassword;
  75. WCHAR m_wNewDAUrl[1024];
  76. PWSTR m_pwszTicketRequest;
  77. PWSTR m_pwszAuthInfo;
  78. PWSTR m_pwszReturnUrl;
  79. // PWSTR m_pwszCbUrl;
  80. BOOL m_fWhistler;
  81. HBITMAP* m_pBitmap;
  82. BOOL m_fPrompt;
  83. WCHAR m_wRealm[128];
  84. WCHAR m_wTimeSkew[16];
  85. PWSTR m_pwszAuthHeader;
  86. DWORD m_dwParentFlags;
  87. WCHAR m_wDAHostName[256];
  88. };
  89. #endif // LOGON_H