Package waffle.windows.auth

## Interface IWindowsSecurityContext

All Known Implementing Classes:
  `WindowsSecurityContextImpl`

    public interface IWindowsSecurityContext

A Windows security context.

Author:
  dblock[at]dblock[dot]org

### Method Summary

All Methods Instance Methods Abstract Methods
`void` `dispose()` Disposes of the context.
`com.sun.jna.platform.win32.Sspi.CtxtHandle` `getHandle()` Context handle.
`IWindowsIdentity` `getIdentity()` Windows Identity.
`String` `getPrincipalName()` Principal name.
`String` `getSecurityPackage()` Security package name.
`byte[]` `getToken()` Token.
`IWindowsImpersonationContext` `impersonate()` Impersonate this security context.
`void` `initialize​(com.sun.jna.platform.win32.Sspi.CtxtHandle continueCtx, com.sun.jna.platform.win32.Sspi.SecBufferDesc continueToken, String targetName)` Initialize the security context, continuing from a previous one.
`boolean` `isContinue()` True if protocol requires continuation.

### Method Detail

#### getSecurityPackage

    String getSecurityPackage()

Security package name.

Returns:
  String.

#### getPrincipalName

    String getPrincipalName()

Principal name.

Returns:
  String.

#### getToken

    byte[] getToken()

Token.

Returns:
  Array of bytes.

#### isContinue

    boolean isContinue()

True if protocol requires continuation.

Returns:
  True or false.

#### getIdentity

    IWindowsIdentity getIdentity()

Windows Identity.

Returns:
  Windows Identity.

#### getHandle

    com.sun.jna.platform.win32.Sspi.CtxtHandle getHandle()

Context handle.

Returns:
  Handle.

#### initialize

    void initialize​(com.sun.jna.platform.win32.Sspi.CtxtHandle continueCtx,
                    com.sun.jna.platform.win32.Sspi.SecBufferDesc continueToken,
                    String targetName)

Initialize the security context, continuing from a previous one.

Parameters:
  `continueCtx` - Continue context.
  `continueToken` - Continue token.
  `targetName` - The target of the context. The string contents are security-package specific.

#### impersonate

    IWindowsImpersonationContext impersonate()

Impersonate this security context.

Returns:
  A Windows Impersonation Context.

#### dispose

    void dispose()

Disposes of the context.