Package waffle.windows.auth.impl

## Class WindowsIdentityImpl

- java.lang.Object
- - waffle.windows.auth.impl.WindowsIdentityImpl

All Implemented Interfaces:
  `IWindowsIdentity`

    public class WindowsIdentityImpl
    extends Object
    implements IWindowsIdentity

Windows Identity.

Author:
  dblock[at]dblock[dot]org

### Constructor Summary

Constructors
`WindowsIdentityImpl​(com.sun.jna.platform.win32.WinNT.HANDLE newWindowsIdentity)` Instantiates a new windows identity impl.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `dispose​()` Dispose of the Windows identity.
`String` `getFqn​()` Fully qualified name.
`IWindowsAccount[]` `getGroups​()` Group memberships.
`byte[]` `getSid​()` Sid.
`String` `getSidString​()` Sid.
`IWindowsImpersonationContext` `impersonate​()` Impersonate a logged on user.
`boolean` `isGuest​()` Returns true if the identity represents a Guest account.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### WindowsIdentityImpl

    public WindowsIdentityImpl​(com.sun.jna.platform.win32.WinNT.HANDLE newWindowsIdentity)

Instantiates a new windows identity impl.

Parameters:
  `newWindowsIdentity` - the new windows identity

### Method Detail

#### getFqn

    public String getFqn​()

Description copied from interface: `IWindowsIdentity`
Fully qualified name.

Specified by:
  `getFqn` in interface `IWindowsIdentity`
Returns:
  String.

#### getGroups

    public IWindowsAccount[] getGroups​()

Description copied from interface: `IWindowsIdentity`
Group memberships.

Specified by:
  `getGroups` in interface `IWindowsIdentity`
Returns:
  Array of accounts.

#### getSid

    public byte[] getSid​()

Description copied from interface: `IWindowsIdentity`
Sid.

Specified by:
  `getSid` in interface `IWindowsIdentity`
Returns:
  Array of bytes.

#### getSidString

    public String getSidString​()

Description copied from interface: `IWindowsIdentity`
Sid.

Specified by:
  `getSidString` in interface `IWindowsIdentity`
Returns:
  String.

#### dispose

    public void dispose​()

Description copied from interface: `IWindowsIdentity`
Dispose of the Windows identity.

Specified by:
  `dispose` in interface `IWindowsIdentity`

#### impersonate

    public IWindowsImpersonationContext impersonate​()

Description copied from interface: `IWindowsIdentity`
Impersonate a logged on user.

Specified by:
  `impersonate` in interface `IWindowsIdentity`
Returns:
  An impersonation context.

#### isGuest

    public boolean isGuest​()

Description copied from interface: `IWindowsIdentity`
Returns true if the identity represents a Guest account.

Specified by:
  `isGuest` in interface `IWindowsIdentity`
Returns:
  True if the identity represents a Guest account, false otherwise.