- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 54 for Authenticate (1.4 sec)
-
samples/guide/src/main/java/okhttp3/recipes/kt/Authenticate.kt
import okhttp3.OkHttpClient import okhttp3.Request import okhttp3.Response import okhttp3.Route class Authenticate { private val client = OkHttpClient .Builder() .authenticator( object : Authenticator { @Throws(IOException::class) override fun authenticate( route: Route?, response: Response, ): Request? {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 2K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/HeadersChallengesTest.kt
.Builder() .add("WWW-Authenticate: Basic realm=\"protected area\"") .build() assertThat(headers.parseChallenges("WWW-Authenticate")) .isEqualTo(listOf(Challenge("Basic", mapOf("realm" to "protected area")))) } @Test fun basicChallengeWithCharset() { val headers = Headers .Builder() .add("WWW-Authenticate: Basic realm=\"protected area\", charset=\"UTF-8\"")
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/jvmTest/kotlin/okhttp3/internal/authenticator/JavaNetAuthenticatorTest.kt
val response = Response .Builder() .request(request) .code(401) .header("WWW-Authenticate", "Basic realm=\"User Visible Realm\"") .protocol(HTTP_2) .message("Unauthorized") .build() val authRequest = authenticator.authenticate(route, response) assertEquals( "Basic ${RecordingAuthenticator.BASE_64_CREDENTIALS}",
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 2.7K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/Authenticator.kt
*/ @Throws(IOException::class) fun authenticate( route: Route?, response: Response, ): Request? companion object { /** An authenticator that knows no credentials and makes no attempt to authenticate. */ @JvmField val NONE: Authenticator = AuthenticatorNone() private class AuthenticatorNone : Authenticator { override fun authenticate( route: Route?,
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-tls/src/main/kotlin/okhttp3/tls/HandshakeCertificates.kt
* certificate is not included in this chain. * * The client's handshake certificates must include a set of trusted root certificates. They will * be used to authenticate the server's certificate chain. Typically this is a set of well-known * root certificates that is distributed with the HTTP client or its platform. It may be * augmented by certificates private to an organization or service.
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat May 10 11:15:14 UTC 2025 - 8.4K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http/HttpHeaders.kt
* token68: * * ``` * WWW-Authenticate: Digest foo=bar * WWW-Authenticate: Digest foo= * ``` * * Similarly, the first line has one challenge and the second line has two challenges: * * ``` * WWW-Authenticate: Digest ,foo=bar * WWW-Authenticate: Digest ,foo * ``` */ fun Headers.parseChallenges(headerName: String): List<Challenge> {
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
public Authenticate() { client = new OkHttpClient.Builder() .authenticator(new Authenticator() { @Override public Request authenticate(Route route, Response response) throws IOException { if (response.request().header("Authorization") != null) { return null; // Give up, we've already attempted to authenticate. }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 30 17:01:12 UTC 2025 - 47.8K bytes - Viewed (0) -
okhttp-urlconnection/src/main/kotlin/okhttp3/JavaNetAuthenticator.kt
@Deprecated(message = "Use okhttp3.Authenticator.Companion.JAVA_NET_AUTHENTICATOR instead") class JavaNetAuthenticator : Authenticator { @Throws(IOException::class) override fun authenticate( route: Route?, response: Response, ): Request? = JAVA_NET_AUTHENTICATOR.authenticate(route, response)
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.3K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/internal/RecordingOkAuthenticator.kt
val responses = mutableListOf<Response>() val routes = mutableListOf<Route>() fun onlyResponse() = responses.single() fun onlyRoute() = routes.single() @Throws(IOException::class) override fun authenticate( route: Route?, response: Response, ): Request? { if (route == null) throw NullPointerException("route == null") responses += response routes += route
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/jvmTest/kotlin/okhttp3/URLConnectionTest.kt
headers = headersOf( "WWW-Authenticate", "Basic realm=\"protected area\", charset=\"UTF-8\"", ), body = "Please authenticate with UTF-8.", ), ) server.enqueue( MockResponse( code = 401, headers = headersOf( "WWW-Authenticate", "Basic realm=\"protected area\"", ),
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Jun 21 20:36:35 UTC 2025 - 133.2K bytes - Viewed (0)