waffle.windows.auth.impl

## Class WindowsCredentialsHandleImpl

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

All Implemented Interfaces:
  IWindowsCredentialsHandle

    public class WindowsCredentialsHandleImpl
    extends Object
    implements IWindowsCredentialsHandle

Pre-existing credentials of a security principal. This is a handle to a previously authenticated logon data used by a security principal to establish its own identity, such as a password, or a Kerberos protocol ticket.

Author:
  dblock[at]dblock[dot]org

### Constructor Summary

Constructors
Constructor and Description
`WindowsCredentialsHandleImpl(String newPrincipalName, int newCredentialsType, String newSecurityPackage)` A new Windows credentials handle.

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`void` `dispose()` Dispose of the credentials handle.
`static IWindowsCredentialsHandle` `getCurrent(String securityPackage)` Returns the current credentials handle.
`com.sun.jna.platform.win32.Sspi.CredHandle` `getHandle()` Get CredHandle.
`void` `initialize()` Initialize a new credentials handle.

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

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

### Constructor Detail

#### WindowsCredentialsHandleImpl

    public WindowsCredentialsHandleImpl(String newPrincipalName,
                                        int newCredentialsType,
                                        String newSecurityPackage)

A new Windows credentials handle.

Parameters:
  `newPrincipalName` - Principal name.
  `newCredentialsType` - Credentials type.
  `newSecurityPackage` - Security package.

### Method Detail

#### getCurrent

    public static IWindowsCredentialsHandle getCurrent(String securityPackage)

Returns the current credentials handle.

Parameters:
  `securityPackage` - Security package, eg. "Negotiate".
Returns:
  A windows credentials handle

#### initialize

    public void initialize()

Initialize a new credentials handle.

Specified by:
  `initialize` in interface `IWindowsCredentialsHandle`

#### dispose

    public void dispose()

Dispose of the credentials handle.

Specified by:
  `dispose` in interface `IWindowsCredentialsHandle`

#### getHandle

    public com.sun.jna.platform.win32.Sspi.CredHandle getHandle()

Get CredHandle.

Specified by:
  `getHandle` in interface `IWindowsCredentialsHandle`
Returns:
  the handle