DavAuthCallback callback function

The WebDAV client calls the application-defined DavAuthCallback callback function to prompt the user for credentials.

The PFNDAVAUTHCALLBACK type defines a pointer to this callback function. DavAuthCallback is a placeholder for the application-defined function name.

Syntax


DWORD DavAuthCallback(
  _In_     LPWSTR lpwzServerName,
  _In_     LPWSTR lpwzRemoteName,
  _In_     DWORD dwAuthScheme,
  _In_     DWORD dwFlags,
  _Inout_  PDAV_CALLBACK_CRED pCallbackCred,
  _Inout_  AUTHNEXTSTEP *NextStep,
  _Out_    PFNDAVAUTHCALLBACK_FREECRED *pFreeCred
);

Parameters

lpwzServerName [in]

A pointer to a NULL-terminated Unicode string that contains the name of the target server.

lpwzRemoteName [in]

A pointer to a NULL-terminated Unicode string that contains the name of the network resource.

dwAuthScheme [in]

A bitmask of flags that specify the authentication schemes to be used.

ValueMeaning
DAV_AUTHN_SCHEME_BASIC
0x00000001

Basic authentication is to be used.

DAV_AUTHN_SCHEME_NTLM
0x00000002

Microsoft NTLM authentication is to be used.

DAV_AUTHN_SCHEME_PASSPORT
0x00000004

Passport authentication is to be used.

DAV_AUTHN_SCHEME_DIGEST
0x00000008

Microsoft Digest authentication is to be used.

DAV_AUTHN_SCHEME_NEGOTIATE
0x00000010

Microsoft Negotiate is to be used.

DAV_AUTHN_SCHEME_CERT
0x00010000

Certificate authentication is to be used.

DAV_AUTHN_SCHEME_FBA
0x00100000

Forms-based authentication is to be used.

 

dwFlags [in]

The flags that the WebDAV service passed in the dwFlags parameter when it called the NPAddConnection3 function.

pCallbackCred [in, out]

A pointer to a DAV_CALLBACK_CRED structure.

NextStep [in, out]

A pointer to an AUTHNEXTSTEP enumeration value that specifies the next action that the WebDAV client should take after a successful call to the DavAuthCallback callback function.

pFreeCred [out]

A pointer to a DavFreeCredCallback callback function.

Return value

If the function succeeds, the return value is ERROR_SUCCESS.

If the function fails, the return value is a system error code.

Remarks

The DavAuthCallback callback function must be registered by calling the DavRegisterAuthCallback function.

To unregister this callback function, use the DavUnregisterAuthCallback function.

This callback function should prompt the user for credentials (either a user name and password or an authentication BLOB) and store this information in the appropriate member of the DAV_CALLBACK_CRED structure that the pCallbackCred parameter points to.

Requirements

Minimum supported client

Windows Vista with SP2 [desktop apps only]

Minimum supported server

Windows Server 2008 with SP2 [desktop apps only]

Header

Davclnt.h

See also

CredUIPromptForCredentials
CredUIPromptForWindowsCredentials
DAV_CALLBACK_AUTH_BLOB
DAV_CALLBACK_AUTH_UNP
DavFreeCredCallback

 

 

Community Additions

ADD
Show:
© 2014 Microsoft