HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
SHA
The Secure Hashing Algorithm is used, and can be defined using the
sha-password-storage-scheme plug-in.
SSHA
The Salted Secure Hashing Algorithm is used, and can be defined using the
ssha-password-storage-scheme plug-in.
If you need to compare the client's credentials against the value of the userPassword attribute,
you can call the slapi_pw_find_sv() function. This function determines which password scheme
was used to store the password and uses the appropriate comparison function to compare a
given value against the encrypted value of the userPassword attribute.
8.5.1.3 What to do if authentication fails
If authentication fails, send one of the following result codes back to the client:
If no entry matches the DN specified by the client, send an [LDAP_NO_SUCH_OBJECT]
result code back to the client.
When calling the “slapi_send_ldap_result()” function to send the result code back to the
client, specify the closest matching DN as the matched argument.
If the client fails to provide the necessary credentials, or if credentials cannot be found in
the entry, send an [LDAP_INAPPROPRIATE_AUTH] result code back to the client.
If the credentials specified by the client do not match the credentials found in the entry, send
an [LDAP_INVALID_CREDENTIALS] result code back to the client.
If a general error occurs, send an [LDAP_OPERATIONS_ERROR] result code back to the
client.
Your function should also return a nonzero value.
You do not need to set any values for the SLAPI_CONN_DN parameter and the
SLAPI_CONN_AUTHTYPE parameter. By default, these parameters are set to NULL and
LDAP_AUTH_NONE, which indicate that the client has bound anonymously.
8.5.1.4 What to do if authentication succeeds
If the authentication is successful, your authentication function should:
Call “slapi_pblock_set()” to set the values of the SLAPI_CONN_DN parameter and the
SLAPI_CONN_AUTHTYPE parameter to the DN and authentication method.
This sets the DN and authentication method for the connection to the client. The server uses
this DN and method in subsequent operations when checking access rights.
You can set SLAPI_CONN_AUTHTYPE to one of the following values:
SLAPD_AUTH_NONE represents no authentication. (The client is binding anonymously.)
SLAPD_AUTH_SIMPLE represents the simple authentication method.
SLAPD_AUTH_SSL represents authentication through SSL.
SLAPD_AUTH_SASL represents SASL authentication.
These values differ from the values in the SLAPI_BIND_METHOD parameter. The values
listed above are string values defined in the slapi-plugin.h header file, whereas the
74 Defining functions for authentication