Skip to content

Commit

Permalink
Fixing FTP extensibility reference (#945)
Browse files Browse the repository at this point in the history
* Fixing FTP extensibility reference

* Update ftp-native-code-extensibility-api-reference.md
  • Loading branch information
rmcmurray authored Mar 4, 2024
1 parent f63acb7 commit 4392455
Show file tree
Hide file tree
Showing 14 changed files with 1,025 additions and 958 deletions.
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
---
title: "FTP Native-Code Extensibility API Reference"
description: Learn about the native-code APIs that developers use to extend the functionality of the FTP 7.5 service for IIS 7.5.
description: Learn about the native-code APIs that developers use to extend the functionality of the FTP service for IIS 7.5 and later.
ms.date: "09/20/2017"
ms.assetid: 50b67888-09fc-4aab-bf51-86b2365461ba
ms.author: "robmcm"
---

# FTP Native-Code Extensibility API Reference
This section describes the native-code APIs that developers use to extend the functionality of the FTP 7.5 service for IIS 7.5.

## In This Section
[FTP Native-Code Extensibility Interfaces](../../ftp-extensibility-reference/native-code-api-reference/ftp-native-code-extensibility-interfaces.md)
Describes the native-code interfaces for the FTP service.

[FTP Native-Code Extensibility Structures](../../ftp-extensibility-reference/native-code-api-reference/ftp-native-code-extensibility-structures.md)
Describes the native-code structures for the FTP service.

## See Also
[FTP Managed-Code Extensibility API Reference](https://msdn.microsoft.com/library/e7b57c2a-e14c-4f14-9707-df95ab8b3660)

This section describes the native-code APIs that developers use to extend the functionality of the FTP service for IIS 7.5 and later.

## In This Section

[FTP Native-Code Extensibility Interfaces](../../ftp-extensibility-reference/native-code-api-reference/ftp-native-code-extensibility-interfaces.md)
Describes the native-code interfaces for the FTP service.

[FTP Native-Code Extensibility Structures](../../ftp-extensibility-reference/native-code-api-reference/ftp-native-code-extensibility-structures.md)
Describes the native-code structures for the FTP service.

## See Also

[FTP Managed-Code Extensibility API Reference](https://msdn.microsoft.com/library/e7b57c2a-e14c-4f14-9707-df95ab8b3660)
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,23 @@ ms.date: "09/06/2017"
ms.assetid: afa33f3c-e758-4cb2-873c-4b902276707c
ms.author: "robmcm"
---

# FTP Native-Code Extensibility Interfaces
Describes the native-code interfaces that developers use to extend the functionality of the FTP 7.5 service for IIS 7.5.

## In This Section
The following table lists the native-code interfaces that are exposed by the FTP service.

|Interface|Definition|
|---|---|
|[IFtpAuthenticationProvider Interface](../../ftp-extensibility-reference/native-code-api-reference/iftpauthenticationprovider-interface-native.md)|Provides an interface for authenticating an FTP user.|
|[IFtpHomeDirectoryProvider Interface](../../ftp-extensibility-reference/native-code-api-reference/iftphomedirectoryprovider-interface-native.md)|Provides an interface for retrieving the path to a user's FTP home directory.|
|[IFtpLogProvider Interface](../../ftp-extensibility-reference/native-code-api-reference/iftplogprovider-interface-native.md)|Provides an interface for logging FTP activity.|
|[IFtpProviderConstruct Interface](../../ftp-extensibility-reference/native-code-api-reference/iftpproviderconstruct-interface.md)|Provides an interface for passing configuration settings to a provider.|
|[IFtpRoleProvider Interface](../../ftp-extensibility-reference/native-code-api-reference/iftproleprovider-interface-native.md)|Provides an interface for FTP authorization and role checks.|

## See Also
[FTP Native-Code Extensibility Structures](../../ftp-extensibility-reference/native-code-api-reference/ftp-native-code-extensibility-structures.md)

Describes the native-code interfaces that developers use to extend the functionality of the FTP 7.5 service for IIS 7.5.

## In This Section

The following table lists the native-code interfaces that are exposed by the FTP service.

|Interface|Definition|
|---|---|
|[IFtpAuthenticationProvider Interface](../../ftp-extensibility-reference/native-code-api-reference/iftpauthenticationprovider-interface-native.md)|Provides an interface for authenticating an FTP user.|
|[IFtpHomeDirectoryProvider Interface](../../ftp-extensibility-reference/native-code-api-reference/iftphomedirectoryprovider-interface-native.md)|Provides an interface for retrieving the path to a user's FTP home directory.|
|[IFtpLogProvider Interface](../../ftp-extensibility-reference/native-code-api-reference/iftplogprovider-interface-native.md)|Provides an interface for logging FTP activity.|
|[IFtpProviderConstruct Interface](../../ftp-extensibility-reference/native-code-api-reference/iftpproviderconstruct-interface.md)|Provides an interface for passing configuration settings to a provider.|
|[IFtpRoleProvider Interface](../../ftp-extensibility-reference/native-code-api-reference/iftproleprovider-interface-native.md)|Provides an interface for FTP authorization and role checks.|

## See Also

[FTP Native-Code Extensibility Structures](../../ftp-extensibility-reference/native-code-api-reference/ftp-native-code-extensibility-structures.md)
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,19 @@ ms.date: "09/06/2017"
ms.assetid: bc442670-15a7-4cc2-a601-0e217173f828
ms.author: "robmcm"
---

# FTP Native-Code Extensibility Structures
Describes the native-code structures for FTP 7.5 in IIS 7.5.

## In This Section
The following table lists the native-code structures that are exposed by the FTP service.


Describes the native-code structures for FTP 7.5 in IIS 7.5.

## In This Section

The following table lists the native-code structures that are exposed by the FTP service.

|Structure|Definition|
|---|---|
|[LOGGING_PARAMETERS Structure](../../ftp-extensibility-reference/native-code-api-reference/logging-parameters-structure.md)|Contains logging information for use with the `IFtpLogProvider` interface.|

## See Also
[FTP Native-Code Extensibility Interfaces](../../ftp-extensibility-reference/native-code-api-reference/ftp-native-code-extensibility-interfaces.md)
|---|---|
|[LOGGING_PARAMETERS Structure](../../ftp-extensibility-reference/native-code-api-reference/logging-parameters-structure.md)|Contains logging information for use with the `IFtpLogProvider` interface.|

## See Also

[FTP Native-Code Extensibility Interfaces](../../ftp-extensibility-reference/native-code-api-reference/ftp-native-code-extensibility-interfaces.md)
Original file line number Diff line number Diff line change
Expand Up @@ -5,87 +5,93 @@ ms.date: 09/06/2017
ms.assetid: ab84c942-f9e5-4dc9-9c51-cb25906deb15
ms.author: robmcm
---

# IFtpAuthenticationProvider::AuthenticateUser Method
Checks to see whether a user name and password are valid.

## Syntax

```cpp#
AuthenticateUser(
LPWSTR pszSessionId,
LPWSTR pszSiteName,
LPWSTR pszUserName,
LPWSTR pszPassword,
LPWSTR * ppszCanonicalUserName,
long * pfAuthenticated
)
```

### Parameters


Checks to see whether a user name and password are valid.

## Syntax

```cpp
AuthenticateUser(
LPWSTR pszSessionId,
LPWSTR pszSiteName,
LPWSTR pszUserName,
LPWSTR pszPassword,
LPWSTR * ppszCanonicalUserName,
long * pfAuthenticated
)
```

### Parameters

|Term|Definition|
|---|---|
|`pszSessionId`|A pointer to a string that contains the session ID.|
|`pszSiteName`|A pointer to a string that contains the site name.|
|`pszUserName`|A pointer to a string that contains the user name.|
|`pszPassword`|A pointer to a string that contains the password.|
|`ppszCanonicalUserName`|A pointer to a string that will contain the canonical name of the user.|
|`pfAuthenticated`|A pointer to a long integer that will contain `true` if the user is authenticated; otherwise, `false`.|

## Return Value
An `HRESULT`. Possible values include, but are not limited to, those in the following table.

|`pszSessionId`|A pointer to a string that contains the session ID.|
|`pszSiteName`|A pointer to a string that contains the site name.|
|`pszUserName`|A pointer to a string that contains the user name.|
|`pszPassword`|A pointer to a string that contains the password.|
|`ppszCanonicalUserName`|A pointer to a string that will contain the canonical name of the user.|
|`pfAuthenticated`|A pointer to a long integer that will contain `true` if the user is authenticated; otherwise, `false`.|

## Return Value

An `HRESULT`. Possible values include, but are not limited to, those in the following table.

|Value|Description|
|---|---|
|S_OK|Indicates that the operation was successful.|

## Remarks
The `ppszCanonicalUserName` parameter can be used to canonicalize user names; the suggested canonical form is domain\user because previous versions of IIS FTP servers required the user name to be in the domain\user form.

A Windows authentication-based provider cannot be implemented with this method because that form of authentication does not allow user tokens to be returned.

## Example
The following code example illustrates how to use the `IFtpAuthenticationProvider` interface to create a custom authentication module for the FTP service that implements user name checks.

```
public:
STDMETHOD(AuthenticateUser)(LPWSTR pszSessionId,
LPWSTR pszSiteName,
LPWSTR pszUserName,
LPWSTR pszPassword,
LPWSTR * ppszCanonicalUserName,
long * pfAuthenticated)
{
// Note: You would add your own custom logic here.
*ppszCanonicalUserName = pszUserName;
CString strUserName = L"MyUser";
CString strPassword = L"MyPassword";
// Verify that the user name and password are valid.
// In this example, the user name is case-insensitive
// and the password is case-sensitive.
if ((strUserName.CompareNoCase(pszUserName)==0) &&
(strPassword.Compare(pszPassword)==0))
{
*pfAuthenticated = TRUE;
}
else
{
*pfAuthenticated = FALSE;
}
return S_OK;
}
```

## Requirements

|Type|Description|
|S_OK|Indicates that the operation was successful.|

## Remarks

The `ppszCanonicalUserName` parameter can be used to canonicalize user names; the suggested canonical form is domain\user because previous versions of IIS FTP servers required the user name to be in the domain\user form.

A Windows authentication-based provider cannot be implemented with this method because that form of authentication does not allow user tokens to be returned.

## Example

The following code example illustrates how to use the `IFtpAuthenticationProvider` interface to create a custom authentication module for the FTP service that implements user name checks.

```cpp
public:
STDMETHOD(AuthenticateUser)(LPWSTR pszSessionId,
LPWSTR pszSiteName,
LPWSTR pszUserName,
LPWSTR pszPassword,
LPWSTR * ppszCanonicalUserName,
long * pfAuthenticated)
{
// Note: You would add your own custom logic here.
*ppszCanonicalUserName = pszUserName;

CString strUserName = L"MyUser";
CString strPassword = L"MyPassword";

// Verify that the user name and password are valid.
// In this example, the user name is case-insensitive
// and the password is case-sensitive.
if ((strUserName.CompareNoCase(pszUserName)==0) &&
(strPassword.Compare(pszPassword)==0))
{
*pfAuthenticated = TRUE;
}
else
{
*pfAuthenticated = FALSE;
}
return S_OK;
}
```
## Requirements
|Type|Description|
|---|---|
|Client|- IIS 7.5 on Windows 7<br />- IIS 8.0 on Windows 8<br />- IIS 10.0 on Windows 10|
|Server|- IIS 7.5 on Windows Server 2008 R2<br />- IIS 8.0 on Windows Server 2012<br />- IIS 8.5 on Windows Server 2012 R2<br />- IIS 10.0 on Windows Server 2016|
|Product|- IIS 7.0, IIS 7.5, IIS 8.0, IIS 8.5, IIS 10.0|
|Reference|ftpext.tlb|

## See Also
[IFtpAuthenticationProvider Interface](../../ftp-extensibility-reference/native-code-api-reference/iftpauthenticationprovider-interface-native.md)
|Client|- IIS 7.5 on Windows 7<br />- IIS 8.0 on Windows 8<br />- IIS 10.0 on Windows 10|
|Server|- IIS 7.5 on Windows Server 2008 R2<br />- IIS 8.0 on Windows Server 2012<br />- IIS 8.5 on Windows Server 2012 R2<br />- IIS 10.0 on Windows Server 2016|
|Product|- IIS 7.0, IIS 7.5, IIS 8.0, IIS 8.5, IIS 10.0|
|Reference|ftpext.tlb|
## See Also
[IFtpAuthenticationProvider Interface](../../ftp-extensibility-reference/native-code-api-reference/iftpauthenticationprovider-interface-native.md)
Loading

0 comments on commit 4392455

Please sign in to comment.