Package waffle.windows.auth.impl
Class WindowsAccountImpl
- java.lang.Object
-
- waffle.windows.auth.impl.WindowsAccountImpl
-
- All Implemented Interfaces:
IWindowsAccount
public class WindowsAccountImpl extends Object implements IWindowsAccount
Windows Account.- Author:
- dblock[at]dblock[dot]org
-
-
Constructor Summary
Constructors Constructor Description WindowsAccountImpl(com.sun.jna.platform.win32.Advapi32Util.Account newAccount)Windows Account.WindowsAccountImpl(String userName)Windows Account.WindowsAccountImpl(String accountName, String systemName)Windows Account.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StringgetCurrentUsername()Get the SAM-compatible username of the currently logged-on user.StringgetDomain()Account domain.StringgetFqn()Fully qualified username.StringgetName()Account name.StringgetSidString()Security identifier.
-
-
-
Constructor Detail
-
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.
-
-
Method Detail
-
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:
getDomainin interfaceIWindowsAccount- Returns:
- String.
-
getFqn
public String getFqn()
Description copied from interface:IWindowsAccountFully qualified username.- Specified by:
getFqnin interfaceIWindowsAccount- Returns:
- String.
-
getName
public String getName()
Account name.- Specified by:
getNamein interfaceIWindowsAccount- Returns:
- String.
-
getSidString
public String getSidString()
Description copied from interface:IWindowsAccountSecurity identifier.- Specified by:
getSidStringin interfaceIWindowsAccount- Returns:
- String in the S- format.
-
-