commandWebAuth.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef NULLSOFT_AUTH_LOGINCOMMAND_WEBAUTH_HEADER
  2. #define NULLSOFT_AUTH_LOGINCOMMAND_WEBAUTH_HEADER
  3. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  4. #pragma once
  5. #endif
  6. #include "./loginCommand.h"
  7. // {48F006E2-EC11-4171-833B-A9CD14F6D727}
  8. static const GUID LCUID_WEBAUTH =
  9. { 0x48f006e2, 0xec11, 0x4171, { 0x83, 0x3b, 0xa9, 0xcd, 0x14, 0xf6, 0xd7, 0x27 } };
  10. class LoginCommandWebAuth : public LoginCommand
  11. {
  12. protected:
  13. LoginCommandWebAuth();
  14. ~LoginCommandWebAuth();
  15. public:
  16. static HRESULT CreateInstance(LoginCommandWebAuth **instance);
  17. public:
  18. ULONG AddRef();
  19. ULONG Release();
  20. HRESULT GetType(GUID *commandUid);
  21. HRESULT SetParameter(LPCWSTR pszKey, LPCWSTR pszValue);
  22. HRESULT IsValid();
  23. HRESULT IsIdentical(LoginCommand *test);
  24. HRESULT BeginLogin(LoginData *data, LoginResult::Callback callback, void *user, LoginResult **result);
  25. HRESULT EndLogin(LoginResult *result, INT *authCode, LoginCredentials **credentials);
  26. HRESULT RequestAbort(LoginResult *result, BOOL drop);
  27. protected:
  28. ULONG ref;
  29. LPWSTR targetUrl;
  30. };
  31. #endif //NULLSOFT_AUTH_LOGINCOMMAND_WEBAUTH_HEADER