Top Description Fields Constructors Methods
waffle.windows.auth.impl

public Class WindowsIdentityImpl

extends Object
implements IWindowsIdentity
Class Inheritance
All Implemented Interfaces
waffle.windows.auth.IWindowsIdentity
Imports
com.sun.jna.platform.win32.Advapi32Util, .Advapi32Util.Account, .Kernel32, .WinNT.HANDLE, .WinNT.WELL_KNOWN_SID_TYPE, java.util.ArrayList, .List, waffle.windows.auth.IWindowsAccount, .IWindowsIdentity, .IWindowsImpersonationContext

Windows Identity.
Author
dblock[at]dblock[dot]org

Field Summary

Modifier and TypeField and Description
private Advapi32Util.Account[]
userGroups

The user groups.

private Advapi32Util.Account
windowsAccount

The windows account.

private final WinNT.HANDLE
windowsIdentity

The windows identity.

Constructor Summary

AccessConstructor and Description
public
WindowsIdentityImpl(final WinNT.HANDLE
the new windows identity
newWindowsIdentity
)

Instantiates a new windows identity impl.

Method Summary

Modifier and TypeMethod and Description
public void
dispose()

Implements waffle.windows.auth.IWindowsIdentity.dispose.

Dispose of the Windows identity.
public String
getFqn()

Implements waffle.windows.auth.IWindowsIdentity.getFqn.

Fully qualified name.
public IWindowsAccount[]
public byte[]
public String
private Advapi32Util.Account[]

Returns:

the user groups
getUserGroups
()

Gets the user groups.

private Advapi32Util.Account

Returns:

the windows account
getWindowsAccount
()

Gets the windows account.

public IWindowsImpersonationContext
impersonate()

Implements waffle.windows.auth.IWindowsIdentity.impersonate.

Impersonate a logged on user.
public boolean
isGuest()

Implements waffle.windows.auth.IWindowsIdentity.isGuest.

Returns true if the identity represents a Guest account.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

userGroupsback to summary
private Advapi32Util.Account[] userGroups

The user groups.

windowsAccountback to summary
private Advapi32Util.Account windowsAccount

The windows account.

windowsIdentityback to summary
private final WinNT.HANDLE windowsIdentity

The windows identity.

Constructor Detail

WindowsIdentityImplback to summary
public WindowsIdentityImpl(final WinNT.HANDLE newWindowsIdentity)

Instantiates a new windows identity impl.

Parameters
newWindowsIdentity:WinNT.HANDLE

the new windows identity

Method Detail

disposeback to summary
public void dispose()

Implements waffle.windows.auth.IWindowsIdentity.dispose.

Doc from waffle.windows.auth.IWindowsIdentity.dispose.

Dispose of the Windows identity.

Annotations
@Override
getFqnback to summary
public String getFqn()

Implements waffle.windows.auth.IWindowsIdentity.getFqn.

Doc from waffle.windows.auth.IWindowsIdentity.getFqn.

Fully qualified name.

Returns:String

String.

Annotations
@Override
getGroupsback to summary
public IWindowsAccount[] getGroups()

Implements waffle.windows.auth.IWindowsIdentity.getGroups.

Doc from waffle.windows.auth.IWindowsIdentity.getGroups.

Group memberships.

Returns:IWindowsAccount[]

Array of accounts.

Annotations
@Override
getSidback to summary
public byte[] getSid()

Implements waffle.windows.auth.IWindowsIdentity.getSid.

Doc from waffle.windows.auth.IWindowsIdentity.getSid.

Sid.

Returns:byte[]

Array of bytes.

Annotations
@Override
getSidStringback to summary
public String getSidString()

Implements waffle.windows.auth.IWindowsIdentity.getSidString.

Doc from waffle.windows.auth.IWindowsIdentity.getSidString.

Sid.

Returns:String

String.

Annotations
@Override
getUserGroupsback to summary
private Advapi32Util.Account[] getUserGroups()

Gets the user groups.

Returns:Advapi32Util.Account[]

the user groups

getWindowsAccountback to summary
private Advapi32Util.Account getWindowsAccount()

Gets the windows account.

Returns:Advapi32Util.Account

the windows account

impersonateback to summary
public IWindowsImpersonationContext impersonate()

Implements waffle.windows.auth.IWindowsIdentity.impersonate.

Doc from waffle.windows.auth.IWindowsIdentity.impersonate.

Impersonate a logged on user.

Returns:IWindowsImpersonationContext

An impersonation context.

Annotations
@Override
isGuestback to summary
public boolean isGuest()

Implements waffle.windows.auth.IWindowsIdentity.isGuest.

Doc from waffle.windows.auth.IWindowsIdentity.isGuest.

Returns true if the identity represents a Guest account.

Returns:boolean

True if the identity represents a Guest account, false otherwise.

Annotations
@Override