public class MockWindowsSecurityContext extends Object implements IWindowsSecurityContext
Constructor and Description |
---|
MockWindowsSecurityContext(String username)
Instantiates a new mock windows security context.
|
Modifier and Type | Method and Description |
---|---|
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()
Initialize.
|
void |
initialize(com.sun.jna.platform.win32.Sspi.CtxtHandle continueCtx,
com.sun.jna.platform.win32.Sspi.SecBufferDesc continueToken,
String targetPrincipalName)
Initialize the security context, continuing from a previous one.
|
boolean |
isContinue()
True if protocol requires continuation.
|
public MockWindowsSecurityContext(String username)
username
- the usernamepublic void dispose()
IWindowsSecurityContext
dispose
in interface IWindowsSecurityContext
public boolean isContinue()
IWindowsSecurityContext
isContinue
in interface IWindowsSecurityContext
public com.sun.jna.platform.win32.Sspi.CtxtHandle getHandle()
IWindowsSecurityContext
getHandle
in interface IWindowsSecurityContext
public IWindowsIdentity getIdentity()
IWindowsSecurityContext
getIdentity
in interface IWindowsSecurityContext
public String getPrincipalName()
IWindowsSecurityContext
getPrincipalName
in interface IWindowsSecurityContext
public String getSecurityPackage()
IWindowsSecurityContext
getSecurityPackage
in interface IWindowsSecurityContext
public byte[] getToken()
IWindowsSecurityContext
getToken
in interface IWindowsSecurityContext
public IWindowsImpersonationContext impersonate()
IWindowsSecurityContext
impersonate
in interface IWindowsSecurityContext
public void initialize()
public void initialize(com.sun.jna.platform.win32.Sspi.CtxtHandle continueCtx, com.sun.jna.platform.win32.Sspi.SecBufferDesc continueToken, String targetPrincipalName)
IWindowsSecurityContext
initialize
in interface IWindowsSecurityContext
continueCtx
- Continue context.continueToken
- Continue token.targetPrincipalName
- The target of the context. The string contents are security-package specific.Copyright © 2010–2015 com.github.dblock. All rights reserved.