com.tagish.auth.win32
Class NTSystem

java.lang.Object
  |
  +--com.tagish.auth.win32.NTSystem

public class NTSystem
extends Object

Proxy class that wraps up the native win32 functionality

Version:
1.0.3
Author:
Andy Armstrong, andy@tagish.com

Constructor Summary
NTSystem()
           
 
Method Summary
 void checkVersion()
           
protected  void finalize()
          Clean up NT resources during garbage collection, in case LoginContext.logout() was not called.
 String getDomain()
          Get the domain for the current NT user.
 String getDomainSID()
          Get a printable SID for the current NT user's domain.
 String[] getGroupIDs()
          Get the printable group SIDs for the current NT user.
 String[] getGroupNames(boolean bSidIfUnavailable)
          Get the printable group names for the current NT user.
 int getImpersonationToken()
          Get an impersonation token for the current NT user.
 String getName()
          Get the username for the current NT user.
 String getPrimaryGroupID()
          Get a printable primary group SID for the current NT user.
 String getPrimaryGroupName()
          Get a printable primary group name for the current NT user.
 String getUserSID()
          Get a printable SID for the current NT user.
 int getVersion()
          Return the DLL version
 void logoff()
          Log the user off.
 void logon(String username, char[] password, String domain)
          Attempt to log a user on.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NTSystem

public NTSystem()
Method Detail

checkVersion

public void checkVersion()

getVersion

public int getVersion()
Return the DLL version

finalize

protected void finalize()
Clean up NT resources during garbage collection, in case LoginContext.logout() was not called.
Overrides:
finalize in class Object

getDomain

public String getDomain()
Get the domain for the current NT user.

getDomainSID

public String getDomainSID()
Get a printable SID for the current NT user's domain.

getGroupIDs

public String[] getGroupIDs()
Get the printable group SIDs for the current NT user.

getGroupNames

public String[] getGroupNames(boolean bSidIfUnavailable)
Get the printable group names for the current NT user.

getImpersonationToken

public int getImpersonationToken()
Get an impersonation token for the current NT user.

getName

public String getName()
Get the username for the current NT user.

getPrimaryGroupID

public String getPrimaryGroupID()
Get a printable primary group SID for the current NT user.

getPrimaryGroupName

public String getPrimaryGroupName()
Get a printable primary group name for the current NT user.

getUserSID

public String getUserSID()
Get a printable SID for the current NT user.

logon

public void logon(String username,
                  char[] password,
                  String domain)
           throws javax.security.auth.login.LoginException
Attempt to log a user on. Once the user is logged on other methods in this class will return information about the specified user rather than the current user.

logoff

public void logoff()
Log the user off. This call returns this object to the state it was in before a call to logon()