| Method from com.sshtools.daemon.platform.NativeAuthenticationProvider Detail: |
abstract public boolean changePassword(String username,
String oldpassword,
String newpassword)
|
abstract public String getHomeDirectory(String username) throws IOException
|
public static NativeAuthenticationProvider getInstance() throws IOException {
if (instance == null) {
try {
if (cls == null) {
throw new IOException(
"There is no authentication provider configured");
}
instance = (NativeAuthenticationProvider) cls.newInstance();
} catch (Exception e) {
throw new IOException(
"The authentication provider failed to initialize: " +
e.getMessage());
}
}
return instance;
}
|
abstract public void logoffUser() throws IOException
|
abstract public boolean logonUser(String username) throws IOException
|
abstract public boolean logonUser(String username,
String password) throws IOException, PasswordChangeException
|
public static void setProvider(Class cls) {
try {
if (ConfigurationLoader.isConfigurationAvailable(
PlatformConfiguration.class)) {
cls = ConfigurationLoader.getExtensionClass(((PlatformConfiguration) ConfigurationLoader.getConfiguration(
PlatformConfiguration.class)).getNativeAuthenticationProvider());
//
}
} catch (Exception e) {
log.error("Failed to load native authentication provider", e);
instance = null;
}
NativeAuthenticationProvider.cls = cls;
}
|