@Test public void testGetDefault() throws Exception { HttpChallengeFactory factory = HttpChallengeFactories.create(); assertNotNull(factory); assertTrue(factory instanceof DispatchHttpChallengeFactory); DispatchHttpChallengeFactory dispatchHttpChallengeFactory = (DispatchHttpChallengeFactory) factory; final Map<String,HttpChallengeFactory> factoryMap = DispatchHttpChallengeFactory.challengeFactoriesByAuthScheme; assertEquals(3, factoryMap.size()); assertTrue(factoryMap.containsKey("Basic")); assertTrue(factoryMap.containsKey("Negotiate")); }
public static HttpChallengeFactory create() { DispatchHttpChallengeFactory factory = new DispatchHttpChallengeFactory(); factory.register("Basic", new BasicHttpChallengeFactory()); factory.register("Negotiate", new NegotiateHttpChallengeFactory()); factory.register(TokenHttpChallengeFactory.AUTH_SCHEME, new TokenHttpChallengeFactory()); return factory; }
HttpChallengeFactories { public static HttpChallengeFactory create() { DispatchHttpChallengeFactory factory = new DispatchHttpChallengeFactory(); factory.register("Basic", new BasicHttpChallengeFactory()); factory.register("Negotiate", new NegotiateHttpChallengeFactory()); factory.register(TokenHttpChallengeFactory.AUTH_SCHEME, new TokenHttpChallengeFactory()); return factory; } }
HttpChallengeFactories { public static HttpChallengeFactory create() { DispatchHttpChallengeFactory factory = new DispatchHttpChallengeFactory(); factory.register("Basic", new BasicHttpChallengeFactory()); factory.register("Negotiate", new NegotiateHttpChallengeFactory()); factory.register(TokenHttpChallengeFactory.AUTH_SCHEME, new TokenHttpChallengeFactory()); return factory; }  }
HttpChallengeFactories { public static HttpChallengeFactory create() { DispatchHttpChallengeFactory factory = new DispatchHttpChallengeFactory(); factory.register("Basic", new BasicHttpChallengeFactory()); factory.register("Negotiate", new NegotiateHttpChallengeFactory()); factory.register(TokenHttpChallengeFactory.AUTH_SCHEME, new TokenHttpChallengeFactory()); return factory; }  static HttpChallengeFactory create(); }
HttpChallengeFactories { public static HttpChallengeFactory create() { DispatchHttpChallengeFactory factory = new DispatchHttpChallengeFactory(); factory.register("Basic", new BasicHttpChallengeFactory()); factory.register("Negotiate", new NegotiateHttpChallengeFactory()); factory.register(TokenHttpChallengeFactory.AUTH_SCHEME, new TokenHttpChallengeFactory()); return factory; }  static HttpChallengeFactory create();  }