UsernameAndPassword or UserNameAndPasswordVer2

UsernameAndPassword for Version 1 or UserNameAndPasswordVer2 for Version 2 supplies the username to be used by the client to authenticate with the Security Gateway for SAA Username/Password authentication.

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

UserNameAndPasswordVer2

Prototype

Copy
UserNameAndPasswordVer2Proc(char* site, char* username, int* usernameLength, char* password, int* passwordLength, 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.

password

Out

The buffer to which the password should be copied.

passwordLength

In
Out

In - Length of the buffer allocated for password.

Out - If password 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 and/or by password 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 cancelled.

UsernameAndPassword

Prototype

Copy
int UserNameAndPassword(char *site, char *username, int *usernameLength, char *password, int *passwordLength);

Arguments

Same as UserNameAndPasswordVer2.

Return Values

Same as UserNameAndPasswordVer2.