ClearBox Server™ v1.2 Developer's Guide

ICommonAuthentication::LogonStatus

Called by server to notify extension about authentication result.

HRESULT LogonStatus(
	[in] long tag,
	[in] USERINFO * userInf,
	[in] AUTHENRESULT authRes,
	[in] AUTHENTYPE authType);

Parameters

tag
[in] Unique value identifying packet (RADIUS or TACACS+) in whose context this method is called.
userInf
[in] Describes user who has being authenticated.
authRes
[in] Result of authentication.
authType
[in] Authentication method used. See Authentication Methods article for more details.

Return Values

If extension returns error code, error is logged. This failure does not affect packet processing.

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.

Remarks

This method can be called in context of other authentication interfaces - IRADIUSAuthentication and ITACACSAuthentication.

Extension can use this method to implement "account disabling" after number of unsuccessfull authentications reaches some limit or to inform administrator.

Example Code

This code disables user's account if he failed to pass authentication via MS-CHAP method.

STDMETHODIMP CTest::LogonStatus (long tag,
	USERINFO * userInf, AUTHENRESULT authRes, AUTHENTYPE authType)
{
	if (authRes!=AR_OK && authType==AT_MSCHAP)
		//Some function defined by extension
		DisableUserAccount(userInf->userName);
	return S_OK;
}

See Also

ICommonAuthentication, Common authentication process


© 2001-2003 XPerience Technologies. www.xperiencetech.com

Created by chm2web html help conversion utility.