net.sourceforge.jtds.util
Class SSPIJNIClient
java.lang.Object
net.sourceforge.jtds.util.SSPIJNIClient
public class SSPIJNIClient
extends java.lang.Object
A JNI client to SSPI based CPP program (DLL) that returns the user
credentials for NTLM authentication.
The DLL name is ntlmauth.dll.
- Magendran Sathaiah (mahi@aztec.soft.net)
initialized
private boolean initialized
SSPI client initialized flag.
libraryLoaded
private static boolean libraryLoaded
SSPI native library loaded flag.
thisInstance
private static SSPIJNIClient thisInstance
Singleton instance.
SSPIJNIClient
private SSPIJNIClient()
Private constructor for singleton.
getInstance
public static SSPIJNIClient getInstance()
throws Exception
Returns the singleton SSPIJNIClient
instance.
initialize
private void initialize()
Initializes the SSPI client.
invokeInitialize
public void invokeInitialize()
Calls #initialize()
if the SSPI client is not already inited.
invokePrepareSSORequest
public byte[] invokePrepareSSORequest()
throws Exception
Calls #prepareSSORequest()
to prepare the NTLM TYPE-1 message.
invokePrepareSSOSubmit
public byte[] invokePrepareSSOSubmit(byte[] buf)
throws Exception
Calls #prepareSSOSubmit(byte[], long)
to prepare the NTLM TYPE-3
message.
invokeUnInitialize
public void invokeUnInitialize()
Calls #unInitialize()
if the SSPI client is inited.
prepareSSORequest
private byte[] prepareSSORequest()
Prepares the NTLM TYPE-1 message and returns it as a
byte[]
.
prepareSSOSubmit
private byte[] prepareSSOSubmit(byte[] buf,
long size)
Prepares the NTLM TYPE-3 message using the current user's credentials.
It needs the challenge BLOB and it's size as input. The challenge BLOB
is nothig but the TYPE-2 message that is received from the SQL Server.
buf
- challenge BLOBsize
- challenge BLOB size
unInitialize
private void unInitialize()
Uninitializes the SSPI client.
Generated on June 12 2008