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.

183 lines
6.9 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows Media Technologies
  4. // Copyright (C) Microsoft Corporation. All rights reserved.
  5. //
  6. // File: authen.idl
  7. //
  8. // Contents:
  9. //
  10. //--------------------------------------------------------------------------
  11. cpp_quote("//+-------------------------------------------------------------------------")
  12. cpp_quote("//")
  13. cpp_quote("// Microsoft Windows Media Technologies")
  14. cpp_quote("// Copyright (C) Microsoft Corporation. All rights reserved.")
  15. cpp_quote("//")
  16. cpp_quote("// Automatically generated by Midl")
  17. cpp_quote("//")
  18. cpp_quote("// DO NOT EDIT THIS FILE.")
  19. cpp_quote("//")
  20. cpp_quote("//--------------------------------------------------------------------------")
  21. cpp_quote("#if _MSC_VER > 1000")
  22. cpp_quote("#pragma once")
  23. cpp_quote("#endif // _MSC_VER > 1000")
  24. import "oaidl.idl";
  25. import "WMSContext.idl";
  26. cpp_quote( "EXTERN_GUID( IID_IWMSAuthenticationPlugin , 0xBE185FF9,0x6932,0x11d2,0x8B,0x3B,0x00,0x60,0x97,0xB0,0x12,0x06 );" )
  27. cpp_quote( "EXTERN_GUID( IID_IWMSAuthenticationContext , 0xBE185FFA,0x6932,0x11d2,0x8B,0x3B,0x00,0x60,0x97,0xB0,0x12,0x06 );" )
  28. cpp_quote( "EXTERN_GUID( IID_IWMSAuthenticationCallback , 0xBE185FFB,0x6932,0x11d2,0x8B,0x3B,0x00,0x60,0x97,0xB0,0x12,0x06 );" )
  29. interface IWMSAuthenticationPlugin;
  30. interface IWMSAuthenticationContext;
  31. interface IWMSAuthenticationCallback;
  32. ///////////////////////////////////////////////////////////////////////////////
  33. //
  34. //
  35. ///////////////////////////////////////////////////////////////////////////////
  36. [
  37. object,
  38. uuid(BE185FF9-6932-11d2-8B3B-006097B01206),
  39. version(9.0),
  40. pointer_default(unique),
  41. helpstring("Provides methods for retrieving information about an authentication plugin and for accessing the plug-ins IWMSAuthenticationContext object.")
  42. ]
  43. interface IWMSAuthenticationPlugin : IUnknown
  44. {
  45. typedef [public] enum WMS_AUTHENTICATION_FLAGS
  46. {
  47. WMS_AUTHENTICATION_TEXT_CHALLENGE = 0x01,
  48. WMS_AUTHENTICATION_CLIENT_SHOWS_UI = 0x02,
  49. WMS_AUTHENTICATION_ANONYMOUS = 0x04,
  50. WMS_AUTHENTICATION_CHALLENGE_FIRST = 0x08,
  51. } WMS_AUTHENTICATION_FLAGS;
  52. //
  53. // Find out the authentication plugin's package name.
  54. //
  55. [helpstring("Called by the server to retrieve the name of the authentication plug-in package.")] HRESULT
  56. GetPackageName( [out,retval] BSTR *pbstrPackageName );
  57. //
  58. // Find out the protocol supported by this authentication response plugin.
  59. // Examples include "Basic", "NTLM", "Digest", "Kerberos", etc...
  60. //
  61. [helpstring("Called by the server to retrieve the name of the protocol used by the authentication plug-in.")] HRESULT
  62. GetProtocolName( [out,retval] BSTR *pbstrProtocolName );
  63. //
  64. // Flags come from WMS_AUTHENTICATION_FLAGS enum list
  65. //
  66. [helpstring("Called by the server to retrieve flags that indicate the credential acquisition support provided by the plug-in.")] HRESULT
  67. GetFlags( [out,retval] long *plFlags );
  68. //
  69. // Create an authentication context which will be used by one session
  70. //
  71. [helpstring("Called by the server to retrieve an authentication context object.")] HRESULT
  72. CreateAuthenticationContext( [out,retval] IWMSAuthenticationContext **ppAuthenCtx );
  73. };
  74. ///////////////////////////////////////////////////////////////////////////////
  75. //
  76. //
  77. ///////////////////////////////////////////////////////////////////////////////
  78. [
  79. object,
  80. uuid(BE185FFA-6932-11d2-8B3B-006097B01206),
  81. version(9.0),
  82. pointer_default(unique),
  83. helpstring("Provides methods that are used to authenticate a client.")
  84. ]
  85. interface IWMSAuthenticationContext : IUnknown
  86. {
  87. //
  88. // Get a pointer to the authentication plugin that implements this context
  89. //
  90. [helpstring("Called by the server to retrieve a pointer to the authentication plug-in that created this authentication context.")] HRESULT
  91. GetAuthenticationPlugin(
  92. [out,retval] IWMSAuthenticationPlugin **ppAuthenPlugin );
  93. //
  94. // Authenticate is the workhorse method that gets invoked one or more
  95. // times throughout an authentication challenge/response sequence
  96. //
  97. [helpstring("Called by the server to verify client credentials.")] HRESULT
  98. Authenticate(
  99. [in] VARIANT ResponseBlob,
  100. [in] IWMSContext *pUserCtx,
  101. [in] IWMSContext *pPresentationCtx,
  102. [in] IWMSCommandContext *pCommandContext,
  103. [in] IWMSAuthenticationCallback *pCallback,
  104. [in] VARIANT Context );
  105. //
  106. // Get the logical user ID (only works if authentication has succeeded).
  107. //
  108. [helpstring("Called by the server to retrieve the logical user ID if authentication succeeds.")] HRESULT
  109. GetLogicalUserID( [out,retval] BSTR *pbstrUserID );
  110. //
  111. // Get the name of the NT security user/group account that this context
  112. // impersonates (only works if authentication has succeeded).
  113. //
  114. [helpstring("Called by the server to retrieve the name of the user account or group associated with this authentication context.")] HRESULT
  115. GetImpersonationAccountName( [out,retval] BSTR *pbstrAccountName );
  116. //
  117. // Get the handle of the NT security user/group account that this context
  118. // impersonates (only works if authentication has succeeded).
  119. //
  120. [helpstring("Called by the server to retrieve an impersonation access token for the user account associated with this authentication context.")] HRESULT
  121. GetImpersonationToken( [out,retval] long *plToken );
  122. };
  123. ///////////////////////////////////////////////////////////////////////////////
  124. //
  125. //
  126. ///////////////////////////////////////////////////////////////////////////////
  127. [
  128. object,
  129. uuid(BE185FFB-6932-11d2-8B3B-006097B01206),
  130. version(9.0),
  131. pointer_default(unique),
  132. helpstring("Provides a method to notify the server of the results of an authentication request.")
  133. ]
  134. interface IWMSAuthenticationCallback : IUnknown
  135. {
  136. ///////////////////////////////////////////////////////////////////////////////
  137. //
  138. // Authentication return codes
  139. //
  140. typedef [public] enum WMS_AUTHENTICATION_RESULT
  141. {
  142. WMS_AUTHENTICATION_SUCCESS = 0x01,
  143. WMS_AUTHENTICATION_DENIED = 0x02,
  144. WMS_AUTHENTICATION_CONTINUE = 0x03,
  145. WMS_AUTHENTICATION_ERROR = 0x04
  146. } WMS_AUTHENTICATION_RESULT;
  147. //
  148. // Called as a result of the context's Authenticate method completing.
  149. //
  150. [helpstring("Called by the plug-in to respond when the server calls IWMSAuthenticationContext::Authenticate.")] HRESULT
  151. OnAuthenticateComplete(
  152. [in] WMS_AUTHENTICATION_RESULT AuthResult,
  153. [in] VARIANT ChallengeBlob,
  154. [in] VARIANT Context );
  155. };