本文整理匯總了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);