當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。