com.textrecruit.ustackserverapi.auth.APIClientKeyAuth Maven / Gradle / Ivy
package com.textrecruit.ustackserverapi.auth;
import java.util.ArrayList;
import java.util.List;
import com.textrecruit.ustackserverapi.params.types.ParameterDefinitionInt;
import org.apache.log4j.Logger;
import org.jboss.netty.handler.codec.http.HttpRequest;
import com.textrecruit.ustackserverapi.APIException;
import com.textrecruit.ustackserverapi.CallParameters;
import com.textrecruit.ustackserverapi.MethodDefinition;
/**
* Validates an API client ID and API key via HTTP Basic Auth
*
* @author jdanner
*
*/
public class APIClientKeyAuth implements AuthenticationInt {
static Logger logger = Logger.getLogger(APIClientKeyAuth.class);
public String getAuthenticationDescription() {
return "Your client ID/API Key via HTTP Basic Authentication required.";
}
public boolean isBasicAuth() {
return true;
}
public List> getAuthenticationParameters() {
List> ret = new ArrayList>();
return ret;
}
@Override
public Boolean authenticate(MethodDefinition method, HttpRequest req, CallParameters params) throws APIException {
ClientKeyAuthBase.authenticate(method, req, params);
return true;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy