package org.apache.http.impl.auth;

import org.apache.http.Header;
import org.apache.http.HttpRequest;
import org.apache.http.auth.AuthenticationException;
import org.apache.http.auth.Credentials;
import org.apache.http.protocol.HttpContext;
import org.apache.http.util.Args;
import org.ietf.jgss.GSSException;
import org.ietf.jgss.Oid;

public class KerberosScheme extends GGSSchemeBase {
   private static final String KERBEROS_OID = "1.2.840.113554.1.2.2";

   public KerberosScheme(boolean stripPort, boolean useCanonicalHostname) {
      super(stripPort, useCanonicalHostname);
   }

   public KerberosScheme(boolean stripPort) {
      super(stripPort);
   }

   public KerberosScheme() {
   }

   public String getSchemeName() {
      return "Kerberos";
   }

   public Header authenticate(Credentials credentials, HttpRequest request, HttpContext context) throws AuthenticationException {
      return super.authenticate(credentials, request, context);
   }

   protected byte[] generateToken(byte[] input, String authServer) throws GSSException {
      return super.generateToken(input, authServer);
   }

   protected byte[] generateToken(byte[] input, String authServer, Credentials credentials) throws GSSException {
      return this.generateGSSToken(input, new Oid("1.2.840.113554.1.2.2"), authServer, credentials);
   }

   public String getParameter(String name) {
      Args.notNull(name, "Parameter name");
      return null;
   }

   public String getRealm() {
      return null;
   }

   public boolean isConnectionBased() {
      return true;
   }
}
