Arno Garrels wrote:
> Any feedback is welcome

Thanks Francois and Maurizio.

I have uploaded a new version:
http://www.duodata.de/misc/delphi/V6-HttpSrv-Ntlm-20060911.zip 

Enhanced TNtlmAuthSession/OverbyteIcsNtlmSsp.pas only:

Sep 11, 2006 V1.01 A. Garrels added func ValidateUserCredentials() which allows
             validation of user credentials locally. Also added func
             ImpersonateContext as well as RevertContext. ImpersonateContext
             will make the calling thread run in the security context of the
             authenticated user.

Sample:
procedure TForm1.Button1Click(Sender: TObject);
var
    Sess: TNtlmAuthSession;
begin
    Sess  := TNtlmAuthSession.Create;
    try
        if Sess.ValidateUserCredentials('user', 'pass', 'dom', False) then
        begin
            if Sess.ImpersonateContext then
            begin
                do something in the new security context    
                Sess.RevertContext;
            end;
        end;
    finally
        freeandnil(sess);
    end;
end;
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to