Public Member Functions | List of all members
AppSecInc::LSA::ImpersonatedUser Class Reference

This class lets the calling thread manage the impersonated security context of a logged-on user. More...

#include <ImpersonatedUser.h>

Inheritance diagram for AppSecInc::LSA::ImpersonatedUser:
AppSecInc::LSA::LoggedOnUser

Public Member Functions

 ImpersonatedUser ()
 
virtual ~ImpersonatedUser ()
 
void Impersonate ()
 impersonate the logged-on user More...
 
void RevertToSelf ()
 revert to the prior security context of the currently impersonated thread More...
 
bool IsImpersonated () const
 returns true if the user is impersonated More...
 
- Public Member Functions inherited from AppSecInc::LSA::LoggedOnUser
 LoggedOnUser ()
 
virtual ~LoggedOnUser ()
 
void Logon (const std::wstring &username, const std::wstring &domain, const std::wstring &password, DWORD dwLogonType, DWORD dwLogonProvider=LOGON32_PROVIDER_DEFAULT)
 logon a user More...
 
void Logon (const std::wstring &username, const std::wstring &password, DWORD dwLogonType, DWORD dwLogonProvider=LOGON32_PROVIDER_DEFAULT)
 logon a user, supports various username syntaxes; supports domain\username and username@domain More...
 
void Logout ()
 logout a user More...
 
bool IsLoggedOn () const
 returns true on logon More...
 
Sid GetSid () const
 returns the user SID More...
 
std::vector< SidGetGroups () const
 returns the user group memberships (SIDs) More...
 
std::vector< PrivilegeGetPrivileges () const
 returns a set of privileges that the logged on user has More...
 
bool HasPrivilege (LUID luid) const
 return true if the user holds a specific privilege More...
 

Additional Inherited Members

- Protected Attributes inherited from AppSecInc::LSA::LoggedOnUser
HANDLE m_hUser
 

Detailed Description

This class lets the calling thread manage the impersonated security context of a logged-on user.

Constructor & Destructor Documentation

ImpersonatedUser::ImpersonatedUser ( )
ImpersonatedUser::~ImpersonatedUser ( )
virtual

Member Function Documentation

void ImpersonatedUser::Impersonate ( )

impersonate the logged-on user

bool AppSecInc::LSA::ImpersonatedUser::IsImpersonated ( ) const
inline

returns true if the user is impersonated

void ImpersonatedUser::RevertToSelf ( )

revert to the prior security context of the currently impersonated thread


The documentation for this class was generated from the following files:


© Application Security Inc. - All Rights Reserved http://msiext.codeplex.com