net.sourceforge.jtds.util
Class SSPIJNIClient

java.lang.Object
  extended by net.sourceforge.jtds.util.SSPIJNIClient

public class SSPIJNIClient
extends java.lang.Object

COPIED FROM jtds PROJECT FOR SSO CAPABILITIES. A JNI client to SSPI based CPP program (DLL) that returns the user credentials for NTLM authentication.

The DLL name is ntlmauth.dll.


Method Summary
static SSPIJNIClient getInstance()
          Returns the singleton SSPIJNIClient instance.
 void invokeInitialize()
          Calls #initialize() if the SSPI client is not already inited.
 byte[] invokePrepareSSORequest()
          Calls #prepareSSORequest() to prepare the NTLM TYPE-1 message.
 byte[] invokePrepareSSOSubmit(byte[] buf)
          Calls #prepareSSOSubmit(byte[], long) to prepare the NTLM TYPE-3 message.
 void invokeUnInitialize()
          Calls #unInitialize() if the SSPI client is inited.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static SSPIJNIClient getInstance()
Returns the singleton SSPIJNIClient instance.

Throws:
java.sql.SQLException - if an error occurs during initialization

invokeInitialize

public void invokeInitialize()
Calls #initialize() if the SSPI client is not already inited.


invokeUnInitialize

public void invokeUnInitialize()
Calls #unInitialize() if the SSPI client is inited.


invokePrepareSSORequest

public byte[] invokePrepareSSORequest()
Calls #prepareSSORequest() to prepare the NTLM TYPE-1 message.

Throws:
java.lang.Exception - if an error occurs during the call or the SSPI client is uninitialized

invokePrepareSSOSubmit

public byte[] invokePrepareSSOSubmit(byte[] buf)
Calls #prepareSSOSubmit(byte[], long) to prepare the NTLM TYPE-3 message.

Throws:
java.lang.Exception - if an error occurs during the call or the SSPI client is uninitialized