ClearBox Server™ v1.2 Developer's Guide


Called by server to check user's password when it is unavailable to extension in clear text but is provided in request packet.

HRESULT CheckPassword(
	[in] long tag,
	[in] USERINFO * userInf,
	[out] VARIANT_BOOL * checkOK);


[in] Unique value identifying packet (RADIUS or TACACS+) in whose context this method is called.
[in] Describes user being authenticated. userPassword field contains password supplied by the user.
[out] Must be set to VARIANT_TRUE if user has entered right password, VARIANT_FALSE otherwise.

Return Values

If extension returns error code, it is assumed that password was incorrect as if checkOK=VARIANT_FALSE.

Thread Safety

This method is called in context of WORK thread. (See Server Threads Model for details.) You should synchronize data which is shared with other threads.

Memory Management

Server allocates and frees memory for userInf fields, so extension must not change them.


If checkOK=VARIANT_FALSE, user is rejected.

Example Code

This code checks user's password using fixed string.

STDMETHODIMP CTest::CheckPassword (long tag,
	USERINFO * userInf, VARIANT_BOOL * checkOK)
	if (wcscmp(userInf->userPassword,L"dummypassword")==0)
	return S_OK;

See Also

ICommonAuthentication, Common authentication process

© 2001-2003 XPerience Technologies.

Created by chm2web html help conversion utility.