Share via


IWMSServer::get_Authenticators

banner art

Previous Next

IWMSServer::get_Authenticators

The get_Authenticators method retrieves an IWMSPlugins interface containing a collection of authentication plug-ins. You can use authentication plug-ins to establish the identity of clients that are requesting connections.

Syntax

  HRESULT get_Authenticators(
  IWMSPlugins**  pVal
);

Parameters

pVal

[out] Pointer to a pointer to the IWMSPlugins interface containing the collection of authentication plug-ins.

Return Values

If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.

Return code Number Description
E_POINTER 0x80004003 Indicates that pVal is a NULL pointer argument.

Remarks

There is no limit to the number of plug-ins that can be in this collection. Authentication plug-ins can use any of the following methods to identify clients:

  • The plug-in can request that the client supply a password and user name. The password can be encrypted or sent as clear text.
  • The plug-in can identify the client based on logon credentials.
  • The plug-in can ignore passwords, user names, and logon credentials.

If the plug-in is able to authenticate the client, it sends information about the client to the authorization plug-in to determine whether access permission can be granted.

The following system plug-ins can be accessed using the get_Authenticators method.

Plug-in Description
WMS Anonymous User Authentication Enables an unauthenticated user to access content without being prompted for either a password or user name. The client is granted the same access permissions granted to the Windows user account specified in the property page for the plug-in.
WMS Digest Authentication Prompts the client for a user name and password to verify identity. Because a hashed version of the password is used, Digest authentication is more secure than using Basic authentication, but not as secure as NTLM or Kerberos authentication.
WMS Negotiate Authentication Supports both NTLM and Kerberos authentication protocols, and uses logon credentials to verify the identity of the client. The password is encrypted.

To create custom authentication plug-ins, see Creating Authentication Plug-ins.

This method calls AddRef internally. To avoid memory leaks, you must call Release when you are finished using the interface.

Example Code

#include <windows.h>
#include "wmsserver.h"

// Declare variables and interfaces.
IWMSServer      *pServer;
IWMSPlugins     *pPlugins;

HRESULT         hr;

// Initialize the COM library and retrieve a pointer
// to an IWMSServer interface.
hr = CoInitialize(NULL);
hr = CoCreateInstance(CLSID_WMSServer,
                      NULL,
                      CLSCTX_ALL,
                      IID_IWMSServer,
                      (void **)&pServer);
if (FAILED(hr)) goto EXIT;

// Retrieve a pointer to an IWMSPlugins interface
// containing authentication plug-ins.
hr = pServer->get_Authenticators(&pPlugins);
if (FAILED(hr)) goto EXIT;

EXIT:
    // TODO: Release temporary COM objects and uninitialize COM.

Requirements

Header: wmsserver.h.

Library: WMSServerTypeLib.dll.

Platform: Windows Server 2003 family, Windows Server 2008 family.

See Also

Previous Next