Click here to show toolbars of the Web Online Help System: show toolbars |
ClearBox Serverâ„¢ v1.2 Developer's Guide |
IRADIUSAuthentication::CanAuthenticateCalled by server after user is authenticated with his password. HRESULT CanAuthenticate( [in] long tag, [in] AUTHENTYPE authType, [in] USERINFOLITE * userInf, [out] BSTR * explainString, [out] RADAUTHENREPLY * authenRes); Parameters
Return ValuesIf extension returns error code, user is rejected. Thread SafetyThis 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 ManagementMemory for userInf fields is allocated and freed by server, so extension must not change them. Memory for explainString may be allocated by extension and is freed by server. RemarksIf authenRes=ACCESS_ACCEPT, user is authenticated, and authorization stage may be performed. If authenRes=ACCESS_REJECT or authenRes=ACCESS_UNDEFINED, user is rejected. If authenRes=ACCESS_CHALLENGE, IRADIUSAuthentication::GetChallengeResponseAttributes is called and challenge packet is sent back to client. Example CodeThis code rejects all users who try to login earlier than 20:00. STDMETHODIMP CTest::CanAuthenticate(long tag, AUTHENTYPE authType, USERINFOLITE * userInf, BSTR * explainString, RADAUTHENREPLY * authenRes ) { SYSTEMTIME systm; GetLocalTime(&systm); if (systm.wHour<20) { *authenRes=ACCESS_REJECT; explainString=SysAllocString(L"Please, try after 20:00"); } else *authenRes=ACCESS_ACCEPT; return S_OK; } See AlsoIRADIUSAuthentication, IRADIUSAuthentication::GetChallengeResponseAttributes, Authentication concepts, RADIUS specific authentication © 2001-2003 XPerience Technologies. www.xperiencetech.com |
Created by chm2web html help conversion utility. |