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.

70 lines
2.5 KiB

  1. //-----------------------------------------------------------------------------
  2. //
  3. // @doc
  4. //
  5. // @module nsconst.h | global constants used in Passport network
  6. //
  7. // Author: Darren Anderson
  8. // Steve Fu
  9. //
  10. // Date: 7/24/2000
  11. //
  12. // Copyright <cp> 1999-2000 Microsoft Corporation. All Rights Reserved.
  13. //
  14. //-----------------------------------------------------------------------------
  15. #pragma once
  16. /* use external linkage to avoid mulitple instances */
  17. #define PPCONST __declspec(selectany) extern const
  18. // ticket attrubute names
  19. #define ATTR_PASSPORTFLAGS L"PassportFlags"
  20. #define ATTR_SECURELEVEL L"CredInfo"
  21. #define ATTR_PINTIME L"PinTime"
  22. #define SecureLevelFromSecProp(s) (s & 0x000000ff)
  23. //
  24. // Flags
  25. //
  26. PPCONST ULONG k_ulFlagsEmailValidated = 0x00000001;
  27. PPCONST ULONG k_ulFlagsHotmailAcctActivated = 0x00000002;
  28. PPCONST ULONG k_ulFlagsHotmailPwdRecovered = 0x00000004;
  29. PPCONST ULONG k_ulFlagsWalletUploadAllowed = 0x00000008;
  30. PPCONST ULONG k_ulFlagsHotmailAcctBlocked = 0x00000010;
  31. PPCONST ULONG k_ulFlagsConsentStatusNone = 0x00000000;
  32. PPCONST ULONG k_ulFlagsConsentStatusLimited = 0x00000020;
  33. PPCONST ULONG k_ulFlagsConsentStatusFull = 0x00000040;
  34. PPCONST ULONG k_ulFlagsConsentStatus = 0x00000060; // two bits
  35. PPCONST ULONG k_ulFlagsAccountTypeKid = 0x00000080;
  36. PPCONST ULONG k_ulFlagsAccountTypeParent = 0x00000100;
  37. PPCONST ULONG k_ulFlagsAccountType = 0x00000180; // two bits
  38. PPCONST ULONG k_ulFlagsEmailPassport = 0x00000200;
  39. PPCONST ULONG k_ulFlagsEmailPassportValid = 0x00000400;
  40. PPCONST ULONG k_ulFlagsHasMsniaAccount = 0x00000800;
  41. PPCONST ULONG k_ulFlagsHasMobileAccount = 0x00001000;
  42. PPCONST ULONG k_ulFlagsSecuredTransportedTicket = 0x00002000;
  43. PPCONST ULONG k_ulFlagsConsentCookieNeeded = 0x80000000;
  44. PPCONST ULONG k_ulFlagsConsentCookieMask = (k_ulFlagsConsentStatus | k_ulFlagsAccountType);
  45. //
  46. // Cookie values.
  47. //
  48. #define EXPIRE_FUTURE "Wed, 30-Dec-2037 16:00:00 GMT"
  49. #define EXPIRE_PAST "Thu, 30-Oct-1980 16:00:00 GMT"
  50. #define COOKIE_EXPIRES(n) ("expires=" ## n ## ";")
  51. // change string to unicode
  52. #define __WIDECHAR__(n) L ## n
  53. #define W_COOKIE_EXPIRES(n) L"expires=" ## __WIDECHAR__(n) ## L";"
  54. //
  55. // secure signin levels
  56. //
  57. PPCONST USHORT k_iSeclevelAny = 0;
  58. PPCONST USHORT k_iSeclevelSecureChannel = 10;
  59. PPCONST USHORT k_iSeclevelStrongCreds = 100;
  60. PPCONST USHORT k_iSeclevelStrongestAvaileble = 0xFF;