Package waffle.mock
Class MockWindowsIdentity
java.lang.Object
waffle.mock.MockWindowsIdentity
- All Implemented Interfaces:
IWindowsIdentity
A Mock windows identity.
-
Constructor Summary
ConstructorDescriptionMockWindowsIdentity
(String newFqn, List<String> newGroups) Instantiates a new mock windows identity. -
Method Summary
-
Constructor Details
-
MockWindowsIdentity
Instantiates a new mock windows identity.- Parameters:
newFqn
- the new fqnnewGroups
- the new groups
-
-
Method Details
-
getFqn
Description copied from interface:IWindowsIdentity
Fully qualified name.- Specified by:
getFqn
in interfaceIWindowsIdentity
- Returns:
- String.
-
getGroups
Description copied from interface:IWindowsIdentity
Group memberships.- Specified by:
getGroups
in interfaceIWindowsIdentity
- Returns:
- Array of accounts.
-
getSid
public byte[] getSid()Description copied from interface:IWindowsIdentity
Sid.- Specified by:
getSid
in interfaceIWindowsIdentity
- Returns:
- Array of bytes.
-
getSidString
Description copied from interface:IWindowsIdentity
Sid.- Specified by:
getSidString
in interfaceIWindowsIdentity
- Returns:
- String.
-
dispose
public void dispose()Description copied from interface:IWindowsIdentity
Dispose of the Windows identity.- Specified by:
dispose
in interfaceIWindowsIdentity
-
isGuest
public boolean isGuest()Description copied from interface:IWindowsIdentity
Returns true if the identity represents a Guest account.- Specified by:
isGuest
in interfaceIWindowsIdentity
- Returns:
- True if the identity represents a Guest account, false otherwise.
-
impersonate
Description copied from interface:IWindowsIdentity
Impersonate a logged on user.- Specified by:
impersonate
in interfaceIWindowsIdentity
- Returns:
- An impersonation context.
-