A credential is a data structure that contains a user ID and password.
If you are using the Enterprise Edition of the Sybase CEP Engine and you have enabled the User Authentication feature, you may need to get and set credentials. To perform an action that requires authentication, create a set of credentials, fill them in with the user's ID and password, and pass those credentials to the function that performs the action that you need.
Specifying credentials will add access only to the resources, such as workspaces and streams, and actions, such as create, read, startProgram, for which the specified user was granted privileges in the ACL file. If the user wasn't granted access to a particular resource/action, then specifying Credentials will not give them access.
The following parts of the Sybase CEP C/C++ API. These functions allow you to get and set credential information. The functions that actually use these credentials are documented elsewhere in this manual.
Parameters:
None
Returns: A pointer to an empty UserCredentials structure. Returns NULL if there is an error.
Parameters:
i_credentials: A pointer to the instance of C8UserCredentials of a the username should be written.
i_user: The username.
Returns: C8_OK on success; C8_FAIL otherwise.
Parameters:
i_credentials: A valid pointer to user credentials.
i_password: The password.
Returns: C8_OK or C8_FAIL.
Parameters:
i_credentials: The credentials for which you want to look up the user name.
Returns: Returns the username for the given credentials. The returned pointer is valid as long as the user credentials pointer is valid and must not be deallocated.
Parameters:
i_credentials: The credentials for which you want to look up the user's password.
Returns: Returns the password for given credentials. The returned pointer is valid as long as the user credentials pointer is valid and must not be deallocated.
Parameters:
i_credentials: A pointer to the credentials to destroy.
Returns: Nothing.