- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 27 for challenges (0.06 sec)
-
okhttp/src/jvmTest/kotlin/okhttp3/HeadersChallengesTest.kt
"jdflkasdf\", qop=\"auth\", stale=\"FALSE\"", ).build() val challenges = headers.parseChallenges("WWW-Authenticate") assertThat(challenges.size).isEqualTo(1) assertThat(challenges[0].scheme).isEqualTo("Digest") assertThat(challenges[0].realm).isEqualTo("myrealm") val expectedAuthParams = mutableMapOf<String, String>() expectedAuthParams["realm"] = "myrealm"
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 16.8K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/authenticator/JavaNetAuthenticator.kt
route: Route?, response: Response, ): Request? { val challenges = response.challenges() val request = response.request val url = request.url val proxyAuthorization = response.code == 407 val proxy = route?.proxy ?: Proxy.NO_PROXY for (challenge in challenges) { if (!"Basic".equals(challenge.scheme, ignoreCase = true)) { continue }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 3.2K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/Response.kt
/** * Returns the RFC 7235 authorization challenges appropriate for this response's code. If the * response code is 401 unauthorized, this returns the "WWW-Authenticate" challenges. If the * response code is 407 proxy unauthorized, this returns the "Proxy-Authenticate" challenges. * Otherwise this returns an empty list of challenges. * * If a challenge uses the `token68` variant instead of auth params, there is exactly one
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Mon Jul 28 14:39:28 UTC 2025 - 18.1K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http/HttpHeaders.kt
*/ fun Headers.parseChallenges(headerName: String): List<Challenge> { val result = mutableListOf<Challenge>() for (h in 0 until size) { if (headerName.equals(name(h), ignoreCase = true)) { val header = Buffer().writeUtf8(value(h)) try { header.readChallengeHeader(result) } catch (e: EOFException) { Platform.get().log("Unable to parse challenge", Platform.WARN, e) } } }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Mon May 05 16:01:00 UTC 2025 - 7.2K bytes - Viewed (0) -
docs/recipes.md
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 30 17:01:12 UTC 2025 - 47.8K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/Authenticate.kt
return null // Give up, we've already attempted to authenticate. } println("Authenticating for response: $response") println("Challenges: ${response.challenges()}") val credential = Credentials.basic("jesse", "password1") return response.request .newBuilder() .header("Authorization", credential) .build()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 2K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/internal/RecordingOkAuthenticator.kt
.newBuilder() .addHeader(header, credential) .build() } private fun schemeMatches(response: Response): Boolean { if (scheme == null) return true return response.challenges().any { it.scheme.equals(scheme, ignoreCase = true) } }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 1.7K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/Authenticator.kt
* challenge. The proxy authenticator may return either an authenticated request, or null to * connect without authentication. * * ```java * for (Challenge challenge : response.challenges()) { * // If this is preemptive auth, use a preemptive credential. * if (challenge.scheme().equalsIgnoreCase("OkHttp-Preemptive")) {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Dec 27 13:39:56 UTC 2024 - 5.5K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/Connection.kt
* connection is typically faster than establishing a new one. * * When a single logical call requires multiple streams due to redirects or authorization * challenges, we prefer to use the same physical connection for all streams in the sequence. There * are potential performance and behavior consequences to this preference. To support this feature,
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Dec 27 13:39:56 UTC 2024 - 4.3K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/KotlinSourceModernTest.kt
} @Test fun challenge() { var challenge = Challenge("", mapOf("" to "")) challenge = Challenge("", "") val scheme: String = challenge.scheme val authParams: Map<String?, String> = challenge.authParams val realm: String? = challenge.realm val charset: Charset = challenge.charset val utf8: Challenge = challenge.withCharset(Charsets.UTF_8) } @Test
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Jun 21 20:36:35 UTC 2025 - 46.5K bytes - Viewed (0)