Interface IAuthenticationMechanism
The interface for an authentication mechanism.
Namespace: FubarDev.FtpServer.Authentication
Assembly: FubarDev.FtpServer.Abstractions.dll
Syntax
public interface IAuthenticationMechanism
Methods
| Improve this Doc View SourceCanHandle(String)
Returns a value indicating whether a mechanism with the given methodIdentifier
is supported by this implementor.
Declaration
bool CanHandle(string methodIdentifier)
Parameters
Type | Name | Description |
---|---|---|
String | methodIdentifier | The method identifier. |
Returns
Type | Description |
---|---|
Boolean | true when the given |
HandleAdatAsync(Byte[], CancellationToken)
Processes the ADAT
command.
Declaration
Task<IFtpResponse> HandleAdatAsync(byte[] data, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
Byte[] | data | The data passed to the ADAT command. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<IFtpResponse> | The response to return. |
HandleAuthAsync(String, CancellationToken)
Processes the AUTH
command.
Declaration
Task<IFtpResponse> HandleAuthAsync(string methodIdentifier, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
String | methodIdentifier | The method identifier. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<IFtpResponse> | The response to return. |
Remarks
If this handler doesn't support the passed methodIdentifier
, then it should
respond with either 502 or 504.
HandlePbszAsync(Int64, CancellationToken)
Processes the PBSZ
command.
Declaration
Task<IFtpResponse> HandlePbszAsync(long size, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
Int64 | size | The protected buffer size passed to the PBSZ command. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<IFtpResponse> | The response to return. |
HandleProtAsync(String, CancellationToken)
Processes the PROT
command.
Declaration
Task<IFtpResponse> HandleProtAsync(string protCode, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
String | protCode | The code passed to the PROT command. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<IFtpResponse> | The response to return. |
Reset()
Resets the authentication mechanism.
Declaration
void Reset()