Class WindowsAccountImpl

java.lang.Object
waffle.windows.auth.impl.WindowsAccountImpl
All Implemented Interfaces:
IWindowsAccount

public class WindowsAccountImpl extends Object implements IWindowsAccount
Windows Account.
  • Constructor Details

    • WindowsAccountImpl

      public WindowsAccountImpl(com.sun.jna.platform.win32.Advapi32Util.Account newAccount)
      Windows Account.
      Parameters:
      newAccount - Account.
    • WindowsAccountImpl

      public WindowsAccountImpl(String userName)
      Windows Account.
      Parameters:
      userName - Fully qualified username.
    • WindowsAccountImpl

      public WindowsAccountImpl(String accountName, String systemName)
      Windows Account.
      Parameters:
      accountName - Username, without a domain or machine.
      systemName - Machine name.
  • Method Details

    • getCurrentUsername

      public static String getCurrentUsername()
      Get the SAM-compatible username of the currently logged-on user.
      Returns:
      String.
    • getDomain

      public String getDomain()
      Account domain.
      Specified by:
      getDomain in interface IWindowsAccount
      Returns:
      String.
    • getFqn

      public String getFqn()
      Description copied from interface: IWindowsAccount
      Fully qualified username.
      Specified by:
      getFqn in interface IWindowsAccount
      Returns:
      String.
    • getName

      public String getName()
      Account name.
      Specified by:
      getName in interface IWindowsAccount
      Returns:
      String.
    • getSidString

      public String getSidString()
      Description copied from interface: IWindowsAccount
      Security identifier.
      Specified by:
      getSidString in interface IWindowsAccount
      Returns:
      String in the S- format.