INSSAuthenticator::GetAuthenticationType

The INSSAuthenticator::GetAuthenticationType method is called to retrieve the type of authentication.

Syntax

HRESULT GetAuthenticationType(
LPBSTR bstrAuthenType
);

Parameters

[out] bstrAuthenType

Specifies the authentication type. Following is a list of authentication types currently supported by the server and player:

Type Description
BASIC HTTP-BASIC authentication
NTLM NT LAN Manager authentication

Return Values

This method should return S_OK upon successful completion, or an HRESULT error value.

Remarks

The dwFlags parameter in INNSAuthenticator::Initialize must be NS_TEXT_WIRE_PROTOCOL when the authentication type is set to “BASIC”. The dwFlags parameter can not be NS_TEXT_WIRE_PROPTOCOL if the authentication type is “NTLM”,

Use the Automation allocation function SysAllocString to allocate memory for the string.

The following sample code demonstrates a skeletal implementation of this method:

HRESULT CSampleAuthenticator::GetAuthenticationType(
                 BSTR * pbstrAuthenType )
{
  *pbstrAuthenType = SysAllocString( A2W ( "Basic" ) ); 
  if( NULL == *pbstrAuthenType )
  {
    return( E_OUTOFMEMORY );
  }
  return( S_OK );
}

See Also

INSSAuthenticator::GetAuthenticatorClass

© 1996-1998 Microsoft Corporation. All rights reserved.