import org.apache.commons.httpclient.methods.GetMethod;
import org.apache.commons.httpclient.params.DefaultHttpParams;
import org.apache.commons.httpclient.params.HttpParams;
import org.apache.commons.httpclient.methods.GetMethod;
import org.apache.commons.httpclient.params.DefaultHttpParams;
import org.apache.commons.httpclient.params.HttpParams;
import org.ietf.jgss.GSSContext;
import org.ietf.jgss.GSSException;
import org.ietf.jgss.GSSManager;
import org.ietf.jgss.GSSContext;
import org.ietf.jgss.GSSException;
import org.ietf.jgss.GSSManager;
/** Implementation of the SPNEGO auth scheme. */
public class SpnegoAuthScheme implements AuthScheme {
/** Implementation of the SPNEGO auth scheme. */
public class SpnegoAuthScheme implements AuthScheme {
return complete;
}
@Override
public String authenticate(Credentials credentials, String method, String uri) throws AuthenticationException {
return complete;
}
@Override
public String authenticate(Credentials credentials, String method, String uri) throws AuthenticationException {
} catch (URIException e1) {
throw new IllegalStateException("Cannot authenticate", e1);
}
} catch (URIException e1) {
throw new IllegalStateException("Cannot authenticate", e1);
}
ArrayList<String> schemes = new ArrayList<>();
schemes.add(SpnegoAuthScheme.NAME);
params.setParameter(AuthPolicy.AUTH_SCHEME_PRIORITY, schemes);
ArrayList<String> schemes = new ArrayList<>();
schemes.add(SpnegoAuthScheme.NAME);
params.setParameter(AuthPolicy.AUTH_SCHEME_PRIORITY, schemes);
int responseCode = Subject.doAs(lc.getSubject(), new PrivilegedExceptionAction<Integer>() {
public Integer run() throws Exception {
int responseCode = Subject.doAs(lc.getSubject(), new PrivilegedExceptionAction<Integer>() {
public Integer run() throws Exception {