ActivID AAA Client Authentication API Functions

Summary

Function Description

authenticate()

Performs an authentication request.

authenticateCR()

Performs an authentication request.

getChallenge()

Asks a RADIUS server for a challenge.

Details

authenticate()

Performs an authentication request against the specified RADIUS server on the specified port and with the specified RADIUS shared secret.

Syntax

int authenticate(

unsigned char* pszServerIPAddress,

unsigned char* pszServerPort,

unsigned char* pszSharedSecret,

unsigned char* pszUserName,

unsigned char* pszPassword,

unsigned int nTimeout);

Parameters

pszServerIPAddress

[in] Zero-terminated string containing the IP address of the RADIUS server.

pszServerPort

[in] Zero terminated string containing the UPD port on which the server listens for authentication request usually 1812. For example, if the port value is 1812, pass "1812".

pszSharedSecret

[in] Zero terminated string containing the RADIUS shared secret to be used in the RADIUS authentication.

pszUserName

[in] Zero terminated string containing the User identifier of the user being authenticated.

pszPassword

[in] Zero terminated string containing the password being used in an authentication request.

nTimeout

An integer. The time to wait in seconds to consider that the authentication request has timed out.

Returns

A status code indicating whether the authentication request has succeeded, failed, timed out, or an error occurred.

authenticateCR()

Performs an authentication request against the specified RADIUS server on the specified port and with the specified RADIUS shared secret.

Syntax

int authenticateCR(

unsigned char* pszServerIPAddress,

unsigned char* pszServerPort,

unsigned char* pszSharedSecret,

unsigned char* pszUserName,

unsigned char* pszPassword,

unsigned char* pszChallenge,

unsigned int nTimeout);

Parameters

pszServerIPAddress

[in] Zero terminated string containing the IP address of the RADIUS server.

pszServerPort

[in] Zero terminated string containing the UPD port on which the server listens for authentication request usually 1812. For example, if the port value is 1812, pass “1812”.

pszSharedSecret

[in] Zero terminated string containing the RADIUS shared secret to be used in the RADIUS authentication.

pszUserName

[in] Zero terminated string containing the User identifier of the user being authenticated.

pszPassword

[in] Zero terminated string containing the password being used in an authentication request.

nTimeout

[in] An integer. The time to wait in seconds to consider that the authentication request has timed out.

Returns

A status code indicating whether the authentication request succeeded, failed, timed out, or an error occurred.

getChallenge()

Requests a challenge from the specified RADIUS server. Usually, the RADIUS server returns a challenge only if a specific keyword is sent as the password. The default value for this keyword in the AAA Server for Remote Access is “challenge”. The challenge returned by the server is used by the RADIUS client to generate a response before calling the authenticateCR() function.

Syntax

int getChallenge(

unsigned char* pszUserName,

unsigned char* pszPassword,

unsigned char* pszServerIPAddress,

unsigned char* pszServerPort,

unsigned char* pszSharedSecret,

unsigned int nTimeout),

unsigned char* pszChallenge,

int nChallengeBufferSize,

unsigned char* pszChallengePrompt,

int nChallengePromptBufferSize);

Parameters

pszUserName

[in] Zero terminated string containing the User identifier of the user being authenticated.

pszPassword

[in] Zero terminated string containing the challenge keyword recognized by the server as the password for challenge request usually “challenge”.

pszServerIPAddress

[in] Zero terminated string containing the IP address of the RADIUS server.

pszServerPort

[in] Zero terminated string containing the UPD port on which the server listens for authentication request usually 1812. For example, if the port value is 1812, pass “1812”.

pszSharedSecret

[in] Zero terminated string containing the RADIUS shared secret to be used in the RADIUS authentication.

nTimeout

[in] An integer. The time to wait in seconds to consider that the authentication request has timed out.

pszChallenge

[out] Zero terminated string containing the challenge generated by the server.

nChallengeBufferSize

[in] An integer containing the size of the buffer pointed by pszChallenge. 254 is usually used.

pszChallengePrompt

[out] Zero terminated string containing the prompt to display on the client.

nChallengePromptBufferSize

[in] An integer containing the size of the buffer that pszChallengePrompt points to. 254 is usually used.

Returns

A status code indicating whether the challenge request succeeded, timed out, or an error occurred.