Package axiom.delauth.token

Source Code of axiom.delauth.token.TokenAuthenticator

package axiom.delauth.token;

import com.sforce.soap.authentication.Authenticate;
import com.sforce.soap.authentication.AuthenticateResult;
import org.apache.log4j.Logger;

public class TokenAuthenticator {
    private static Logger logger = Logger.getLogger(TokenAuthenticator.class);

    private TokenStore tokenStore = new TokenStorePojo();

    public AuthenticateResult authenticate(Authenticate parameters) throws java.rmi.RemoteException {

        boolean authenticated = tokenStore.confirmToken(parameters.getUsername(), parameters.getPassword());
        logger.info("User " + parameters.getUsername() + " has been authenticated");

        return new AuthenticateResult(authenticated);

    }

}
TOP

Related Classes of axiom.delauth.token.TokenAuthenticator

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.