@Test public void getChallengeFromSingleWWWAuthHeader() { String[] result = splitWWWAuthenticateHeaderBySchemes(SINGLE_TYPE_WWW_AUTH_HEADER); Assert.assertEquals(1, result.length); Assert.assertEquals(SINGLE_TYPE_WWW_AUTH_HEADER, result[0]); WWWAuthChallenge challenge = new WWWAuthChallenge(result[0]); Assert.assertEquals("Basic", challenge.getScheme()); Assert.assertEquals("factor1", challenge.getRealm()); Assert.assertEquals(SINGLE_TYPE_WWW_AUTH_HEADER, challenge.getChallenge()); }
static String[] splitWWWAuthenticateHeaderBySchemes(String headerValue) { return headerValue.split(",\\s(?=[^\\s]+\\srealm=)"); }
WWWAuthenticateHeaderUtils { static String[] splitWWWAuthenticateHeaderBySchemes(String headerValue) { return headerValue.split(",\\s(?=[^\\s]+\\srealm=)"); } }
WWWAuthenticateHeaderUtils { static String[] splitWWWAuthenticateHeaderBySchemes(String headerValue) { return headerValue.split(",\\s(?=[^\\s]+\\srealm=)"); } private  WWWAuthenticateHeaderUtils(); }
WWWAuthenticateHeaderUtils { static String[] splitWWWAuthenticateHeaderBySchemes(String headerValue) { return headerValue.split(",\\s(?=[^\\s]+\\srealm=)"); } private  WWWAuthenticateHeaderUtils(); static List<WWWAuthChallenge> getChallenges(String headerValue); }
WWWAuthenticateHeaderUtils { static String[] splitWWWAuthenticateHeaderBySchemes(String headerValue) { return headerValue.split(",\\s(?=[^\\s]+\\srealm=)"); } private  WWWAuthenticateHeaderUtils(); static List<WWWAuthChallenge> getChallenges(String headerValue);  }