本文整理汇总了Java中org.alfresco.jlan.ftp.FTPSrvSession类的典型用法代码示例。如果您正苦于以下问题:Java FTPSrvSession类的具体用法?Java FTPSrvSession怎么用?Java FTPSrvSession使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
FTPSrvSession类属于org.alfresco.jlan.ftp包,在下文中一共展示了FTPSrvSession类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: authenticateUser
import org.alfresco.jlan.ftp.FTPSrvSession; //导入依赖的package包/类
@Override
public boolean authenticateUser(ClientInfo info, FTPSrvSession sess)
{
for (FTPAuthenticatorBase authenticator : getUsableFtpAuthenticators())
{
if (authenticator.authenticateUser(info, sess))
return true;
}
// authentication failed in all of the authenticators
return false;
}
示例2: authenticateUser
import org.alfresco.jlan.ftp.FTPSrvSession; //导入依赖的package包/类
@Override
public boolean authenticateUser (ClientInfo info, FTPSrvSession sess)
{
return authenticateAs;
}
示例3: authenticateUser
import org.alfresco.jlan.ftp.FTPSrvSession; //导入依赖的package包/类
/**
*
* {@inheritDoc}
*/
@Override
public boolean authenticateUser(final ClientInfo client, final FTPSrvSession sess)
{
boolean result;
// we need this override to re-check if FTP is enabled based on the tenant domain
// previous isActive did not know about user
if (client instanceof AlfrescoClientInfo)
{
// only default tenant can support anonymous guest login
if (!client.isGuest())
{
final String userName = client.getUserName();
final String primaryDomain = this.tenantService.getPrimaryDomain(userName);
if (primaryDomain == null || TenantService.DEFAULT_DOMAIN.equals(primaryDomain))
{
if (!this.isActive(TenantUtil.DEFAULT_TENANT))
{
LOGGER.debug(
"Failing authentication for {} from {} as tenant {} has not been enabled for this authentication subsystem",
client.getUserName(), client.getClientAddress(), TenantUtil.DEFAULT_TENANT);
result = false;
}
else
{
result = super.authenticateUser(client, sess);
LOGGER.debug("Authenticated {} from {} with tenant {}: {}", userName, client.getClientAddress(),
TenantUtil.DEFAULT_TENANT, result);
}
}
else if (!this.isActive(primaryDomain))
{
LOGGER.debug(
"Failing authentication for {} from {} as tenant {} has not been enabled for this authentication subsystem",
client.getUserName(), client.getClientAddress(), primaryDomain);
result = false;
}
else
{
result = super.authenticateUser(client, sess);
LOGGER.debug("Authenticated {} from {} with tenant {}: {}", userName, client.getClientAddress(), primaryDomain, result);
}
}
else if (this.isActive(TenantUtil.DEFAULT_TENANT))
{
result = super.authenticateUser(client, sess);
LOGGER.debug("Authenticated guest from {} with tenant {}: {}", client.getClientAddress(), TenantUtil.DEFAULT_TENANT,
result);
}
else
{
LOGGER.debug("Failing authentication for guest from {} as tenant {} has not been enabled for this authentication subsystem",
client.getClientAddress(), TenantUtil.DEFAULT_TENANT);
result = false;
}
}
else
{
if (client != null)
{
LOGGER.warn("Failing authentication as client is of unsupported type {}", client.getClass());
}
else
{
LOGGER.warn("Failing authentication as client is null");
}
result = false;
}
return result;
}
示例4: authenticateUser
import org.alfresco.jlan.ftp.FTPSrvSession; //导入依赖的package包/类
/**
* Authenticate the user
*
* @param info ClientInfo
* @param sess FTPSrvSession
* @return boolean
*/
public abstract boolean authenticateUser(ClientInfo info, FTPSrvSession sess);