当前位置: 首页>>代码示例>>Java>>正文


Java FTPSrvSession类代码示例

本文整理汇总了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;
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:12,代码来源:AbstractChainingFtpAuthenticator.java

示例2: authenticateUser

import org.alfresco.jlan.ftp.FTPSrvSession; //导入依赖的package包/类
@Override
public boolean authenticateUser (ClientInfo info, FTPSrvSession sess)
{
    return authenticateAs;
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:6,代码来源:TestFtpAuthenticator.java

示例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;
}
 
开发者ID:Acosix,项目名称:alfresco-mt-support,代码行数:79,代码来源:TenantRoutingFTPAuthenticatorFacade.java

示例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);
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:9,代码来源:FTPAuthenticatorBase.java


注:本文中的org.alfresco.jlan.ftp.FTPSrvSession类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。