Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for auth (0.13 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/connection/RealCall.kt

     * canceling may break the entire connection.
     */
    class RealCall(
      val client: OkHttpClient,
      /** The application's original request unadulterated by redirects or auth headers. */
      val originalRequest: Request,
      val forWebSocket: Boolean,
    ) : Call, Cloneable {
      internal val lock: ReentrantLock = ReentrantLock()
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 17.9K bytes
    - Viewed (2)
  2. okhttp/src/main/kotlin/okhttp3/internal/connection/ConnectPlan.kt

        val nextTunnelRequest =
          createTunnel()
            ?: return ConnectResult(plan = this) // Success.
    
        // The proxy decided to close the connection after an auth challenge. Retry with different
        // auth credentials.
        rawSocket?.closeQuietly()
    
        val nextAttempt = attempt + 1
        return when {
          nextAttempt < MAX_TUNNEL_ATTEMPTS -> {
            user.callConnectEnd(route, null)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 18.6K bytes
    - Viewed (0)
  3. mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt

          }
        }
      }
    
      @ExperimentalOkHttpApi
      companion object {
        private const val CLIENT_AUTH_NONE = 0
        private const val CLIENT_AUTH_REQUESTED = 1
        private const val CLIENT_AUTH_REQUIRED = 2
    
        private val UNTRUSTED_TRUST_MANAGER =
          object : X509TrustManager {
            @Throws(CertificateException::class)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Mar 31 17:16:15 GMT 2024
    - 37.4K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/http/RetryAndFollowUpInterceptor.kt

        val responseCode = userResponse.code
    
        val method = userResponse.request.method
        when (responseCode) {
          HTTP_PROXY_AUTH -> {
            val selectedProxy = route!!.proxy
            if (selectedProxy.type() != Proxy.Type.HTTP) {
              throw ProtocolException("Received HTTP_PROXY_AUTH (407) code while not using proxy")
            }
            return client.proxyAuthenticator.authenticate(route, userResponse)
          }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 13:24:48 GMT 2024
    - 12.1K bytes
    - Viewed (4)
  5. okhttp/src/main/kotlin/okhttp3/internal/connection/RealRoutePlanner.kt

       * This avoids sending potentially sensitive data like HTTP cookies to the proxy unencrypted.
       *
       * In order to support preemptive authentication we pass a fake "Auth Failed" response to the
       * authenticator. This gives the authenticator the option to customize the CONNECT request. It can
       * decline to do so by returning null, in which case OkHttp will use it as-is.
       */
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 12K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/internal/http2/HttpOverHttp2Test.kt

          MockResponse(body = "Successful auth!"),
        )
        val credential = basic("username", "password")
        client =
          client.newBuilder()
            .authenticator(RecordingOkAuthenticator(credential, "Basic"))
            .build()
        val call = client.newCall(Request(server.url("/")))
        val response = call.execute()
        assertThat(response.body.string()).isEqualTo("Successful auth!")
        val denied = server.takeRequest()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 75.3K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/CallTest.kt

        server.useHttps(handshakeCertificates.sslSocketFactory())
        server.enqueue(
          MockResponse(
            code = HttpURLConnection.HTTP_PROXY_AUTH,
            headers = headersOf("Proxy-Authenticate", "Basic realm=\"localhost\""),
            body = "proxy auth required",
            inTunnel = true,
          ),
        )
        server.enqueue(MockResponse(inTunnel = true))
        server.enqueue(MockResponse())
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 142.5K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/CacheTest.kt

            .code(responseCode)
            .body("ABCDE")
            .addHeader("WWW-Authenticate: challenge")
        when (responseCode) {
          HttpURLConnection.HTTP_PROXY_AUTH -> {
            builder.addHeader("Proxy-Authenticate: Basic realm=\"protected area\"")
          }
    
          HttpURLConnection.HTTP_UNAUTHORIZED -> {
            builder.addHeader("WWW-Authenticate: Basic realm=\"protected area\"")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 108.6K bytes
    - Viewed (0)
Back to top