package org.chenyang.http.impl.auth;

import org.chenyang.http.auth.AuthScheme;
import org.chenyang.http.auth.AuthSchemeFactory;
import org.chenyang.http.params.HttpParams;

/** @deprecated */
@Deprecated
public class NegotiateSchemeFactory implements AuthSchemeFactory {
   private final SpnegoTokenGenerator spengoGenerator;
   private final boolean stripPort;

   public NegotiateSchemeFactory(SpnegoTokenGenerator spengoGenerator, boolean stripPort) {
      this.spengoGenerator = spengoGenerator;
      this.stripPort = stripPort;
   }

   public NegotiateSchemeFactory(SpnegoTokenGenerator spengoGenerator) {
      this(spengoGenerator, false);
   }

   public NegotiateSchemeFactory() {
      this((SpnegoTokenGenerator)null, false);
   }

   public AuthScheme newInstance(HttpParams params) {
      return new NegotiateScheme(this.spengoGenerator, this.stripPort);
   }

   public boolean isStripPort() {
      return this.stripPort;
   }

   public SpnegoTokenGenerator getSpengoGenerator() {
      return this.spengoGenerator;
   }
}
