TCPIP_TELNET_AuthenticationRegister Function

C

TCPIP_TELNET_HANDLE TCPIP_TELNET_AuthenticationRegister(
    TCPIP_TELNET_AUTH_HANDLER authHandler, 
    const void* handlerParam
);

Description

This function registers a new authentication handler. telnet module will call the handler when an user tries to login and needs to be authenticated.

Preconditions

Telnet properly initialized.

Parameters

ParametersDescription
authHandlerThe handler which will be called for authentication.
handlerParamHandler parameter that will be called with the handler unused by telnet.

Returns

  • A valid TCPIP_TELNET_HANDLE - If the operation succeeded.

  • NULL - If the operation failed.

Remarks

Currently only one authentication handler is supported by the telnet module. The call will fail if a handler is already registered. Use TCPIP_TELNET_AuthenticationDeregister() first.

This is the PREFERRED authentication method! If there's no registrated handler, any login attempt will fail.

The build should have TCPIP_TELNET_OBSOLETE_AUTHENTICATION == false.

Example

TCPIP_TELNET_HANDLE authHandle = TCPIP_TELNET_AuthenticationRegister( myAuthHandler, myParam );