UserName

Username supplies the username to be used by the client to authenticate with the Security Gateway for SAA Challenge/Response authentication.

If the Authentication Agent wants to handle the authentication, it must supply a username, and a (possibly NULL) context. If the Authentication Agent does not want to handle the authentication, it returns PLUGIN_ABORT. The authentication is then handled by the client.

Prototype

Copy
int Username(char *site, char *username, int *usernameLength, void **context)

Arguments

Argument

In/Out

Meaning

site

In

The name of the site being accessed, as defined in the client Sites window. This lets the Authentication Agent display the name of the site.

username

Out

The buffer to which username should be copied.

usernameLength

In
Out

In - Length of the buffer allocated for username.

Out - If username is longer than the specified length, the function should return PLUGIN_DATA_TOO_LONG and use this argument to indicate the number of bytes required.

context

Out

A context supplied by the Authentication Agent to be

used in subsequent calls to Response.

Return Values

  • PLUGIN_OK if successful.

  • PLUGIN_ABORT if the client should take over the authentication.

  • PLUGIN_DATA_TOO_LONG if the buffer specified by username is not long enough.

  • PLUGIN_CANCEL if the authentication should be terminated. This should be used with discretion since Authentication Agents generally do not have enough information to determine whether the authentication should be canceled.