AREAVerifyLoginCallback
Description
The plug-in server calls this function when the makes a request to authenticate a user. The passes the unencrypted user name and password as parameters.
To be thread-safe, your plug-in must protect any global information or resources accessed here with appropriate mutual exclusion locks.
An AREA plug-in implementation must return a response. A NULL response indicates a failed login attempt.
The detects the IP address of the client and sends it to the plug-in, which rejects or accepts the requests.
Synopsis
#include "area.h"
int AREAVerifyLoginCallback(
void *object,
ARAccessNameType user,
ARPasswordType password,
ARAccessNameType networkAddr,
ARAuthType authString,
AREAResponseStruct **response)
Input arguments
object
Pointer to the plug-in instance that the call to ARPluginCreateInstance returned.
user
User name.
password
User password. If the password is a NULL pointer, as opposed to an empty string, the is attempting to send the user a notification and needs to determine the user's notification mechanism and email address. When the password is NULL, the is not requesting authentication of the user's identity. The plug-in implementation should return notification mechanism and email address information for the user and return a successful login attempt.
networkAddr
IP address of the client. The determines the client's IP address and passes the address, user name, and password to the plug-in.
For connections using external authentication (AREA), you can use the IP address of the client machine as authentication, even when using a firewall or a load balancer. However, you cannot use the IP address as authentication when making connections. In this case, the IP address passed is for the machine where is installed, not for the client machine.
authString
String that the API client user enters into the login screen. This string has no format restrictions. The AREA plug-in uses this string for authentication purposes.
Return values
response
Pointer to a response structure containing user information returned from the plug-in. The structure should be freed using AREAFreeCallback when no longer needed.
See also