Francois Piette wrote:
>>              ImpersonateContext as well as RevertContext.
>> ImpersonateContext              will make the calling thread run in
>> the security context of the              authenticated user.
> 
> I'm using LogonUser, ImpersonateLoggedOnUser and RevertToSelf in some
> of my applications. What are the differences between those and
> ImpersonateContext and RevertContext ?

LogonUser works only if your account has 'Act As Part Of The 
Operating System' privileges. Beside that I think they are the same.


> 
> Contribute to the SSL Effort. Visit
> http://www.overbyte.be/eng/ssl.html --
> [EMAIL PROTECTED]
> Author of ICS (Internet Component Suite, freeware)
> Author of MidWare (Multi-tier framework, freeware)
> http://www.overbyte.be
> 
> 
> ----- Original Message -----
> From: "Arno Garrels" <[EMAIL PROTECTED]>
> To: "ICS support mailing" <twsocket@elists.org>
> Sent: Monday, September 11, 2006 9:21 AM
> Subject: Re: [twsocket] THttpSrv supporting NTLM Beta
> 
> 
>> 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
-- 
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