All plug-ins wanting to augment or override the default authentication behavior of the calendar server must implement this interface.
The csIAuthentication interface implements five methods:
Change a user’s password. |
|
Confirms that the interface was found and registered. |
|
Logs in a user. |
|
Logs out a user. |
|
Verify a user’s existence. |
Allows you to define logon, logoff, verification, and password methods that implement the authentication technique of your choice. You can replace a method and still continue to use the default for the others. Each method uses the return code parameter (aReturnCode) to tell the server whether to continue with the default access control process after executing the method. The return code value must be one of the following constants:
NS_CONTINUE_DEFAULT_PROCESSING |
Indicates that the server is to continue default access control processing. |
NS_OVERRIDE_DEFAULT_PROCESSING |
Indicates that this method overrides the server's native access control mechanism. |
Changes the password for the specified user.
PRUint32 Init (char* aUser, char* aOldPassword, char* aNewPassword, PRInt32 *aReturnCode)=0;
The method has the following four parameters:
On success, NS_AUTHENTICATION_CHANGEPASSWORD_SUCCESS.
On failure, NS_AUTHENTICATION_CHANGEPASSWORD_FAILURE.
Changes the password of the specified user.
Confirms that the interface has been registered, and provides a reference to the server.
PRUint32 Init (nsISupports *aServer)=0;
The method has the following parameter:
aServer |
On return, this location contains a reference to the server with which the module is registered. |
NS_OK on success. A non-zero code on failure.
The server calls this method after finding and registering the interface on module load, to confirm that the operation was successful. You can use the pointer returned in aServer to make calls out to the server.
Augment or override the authentication procedure for plain text login.
PRUint32 Login (char* aUser, char* aPassword, PRInt32 *aReturnCode)=0;
The method has the following three parameters:
On success, NS_AUTHENTICATION_LOGON_SUCCESS.
On failure, NS_AUTHENTICATION_LOGON_FAILURE.
Use this method to specify your own authentication procedure on login to Calendar Server. You can augment the native authentication mechanism, performing your own processing first, then continuing with the default process, or you can completely replace the native authentication mechanism
Logout a user.
PRUint32 Init (char* aUser,PRInt32 *aReturnCode)=0;
The method has the following two parameters:
NS_OK on success. A non-zero error code on failure.
None.
Verify that the user ID is in the LDAP directory.
PRUint32 Init (char* aUser,PRInt32 *aReturnCode)=0;
The method has the following two parameters:
NS_OK on success. A non-zero error code on failure.
None.