zauth.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*-------------------------------------------------------------------------
  2. zauth.h
  3. Interfaces for zone authentication / authorization
  4. Owner:
  5. Copyright 1986-2000 Microsoft Corporation, All Rights Reserved
  6. *-----------------------------------------------------------------------*/
  7. #ifndef _ZAUTH_H_
  8. #define _ZAUTH_H_
  9. //#include <zoneauth.h>
  10. #define OBLIVION_TOKEN_GROUP "Allegiance"
  11. #define OBLIVION_ZONE_KEY "Curt loves DPlay."
  12. class IZoneAuthServer : public IObject
  13. {
  14. public:
  15. virtual HRESULT DecryptTicket(LPBYTE pbTicket, DWORD cbTicket) = 0;
  16. virtual bool HasToken(LPSTR szToken, bool * pfValidNow) = 0;
  17. virtual LPCSTR GetName() = 0;
  18. virtual LPCSTR GetAuthServer() = 0;
  19. virtual unsigned long GetAccountID() = 0;
  20. };
  21. TRef<IZoneAuthServer> CreateZoneAuthServer();
  22. class IZoneAuthClient : public IObject
  23. {
  24. public:
  25. virtual HRESULT IsAuthenticated(DWORD msTimeout) = 0;
  26. virtual HRESULT Authenticate(LPSTR szName, LPSTR szPW, bool fPWChanged, BOOL fRememberPW, DWORD msTimeout) = 0;
  27. virtual void GetDefaultLogonInfo(OUT char * szName, OUT char * szPW, OUT BOOL * pfRememberPW) = 0;
  28. virtual HRESULT GetTicket(OUT LPBYTE * ppBuffer, OUT DWORD * pcbBuffer, OUT LPSTR szLogin, IN OUT DWORD * pcbLogin) = 0;
  29. virtual ZString & GetAuthServer() = 0;
  30. virtual void SetAuthServer(ZString strAuthServer) = 0;
  31. virtual bool HasInterface(REFIID iid) = 0;
  32. };
  33. TRef<IZoneAuthClient> CreateZoneAuthClient();
  34. #endif