alfresco-community-repo/source/java/org/alfresco/repo/deploy/DeploymentReceiverAuthenticatorAuthenticationService.java
Kevin Roast 9c23ced4aa Merged V3.2E to HEAD
17635: Complete fix for ETHREEOH-2879 - user with missing first/last name able to use Discussions, Blogs, Links etc. in Share.
   17637: Fix regression from r17601: Favourite sites in header menu.
   17638: Fix ETHREEOH-3610 - upgrade Enterprise 2.x -> 3.2 (personUsagePatch)
   17641: ETHREEOH-3612 Security Issue : DeploymentTarget uses String to represent passwords
   17642: Fix for ETHREEOH-3482 - Impossible to delete content from its details page.
          - regression due to the "AbortProcessingException" changes added a while back.
   17660: Minor functional fixes for mobile app and cleanup
   17663: Fixed ETHREEOH-3664 "'My Tasks' dashlet could not load task list if a user was invited to a private site"
            - When webscript accessed a private site undefined was returned so the title and description couldn't be displayed, now the values are store on the invite task instead.
   17665: Fix up compile errors from r17663 - also clean up old code to coding standards in related invite classes.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@18162 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2010-01-20 10:51:08 +00:00

49 lines
1.1 KiB
Java

package org.alfresco.repo.deploy;
import org.alfresco.deployment.impl.server.DeploymentReceiverAuthenticator;
import org.alfresco.repo.security.authentication.AuthenticationException;
import org.alfresco.service.cmr.security.AuthenticationService;
/**
* This authenticator uses the Authentication Service to authenticate against the repository.
*
*/
public class DeploymentReceiverAuthenticatorAuthenticationService implements DeploymentReceiverAuthenticator
{
private AuthenticationService authenticationService;
public void init()
{
}
/**
* Are the user and password valid for this deployment receiver?
* @param user
* @param password
* @return true, yes - go ahead.
*/
public boolean logon(String user, char[] password)
{
try
{
authenticationService.authenticate(user, password);
return true;
}
catch (AuthenticationException e)
{
return false;
}
}
public void setAuthenticationService(AuthenticationService authenticationService) {
this.authenticationService = authenticationService;
}
public AuthenticationService getAuthenticationService() {
return authenticationService;
}
}