Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 32 for auth (0.2 sec)

  1. okhttp/src/test/java/okhttp3/HeadersChallengesTest.kt

        expectedAuthParams["qop"] = "auth"
        expectedAuthParams["stale"] = "FALSE"
        assertThat(challenges[0].authParams).isEqualTo(expectedAuthParams)
      }
    
      @Test fun testDigestChallengeWithDifferentlyOrderedAuthParams() {
        val headers =
          Headers.Builder()
            .add(
              "WWW-Authenticate",
              "Digest qop=\"auth\", realm=\"myrealm\", nonce=\"fjalskdflwejrlask" +
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 16.6K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/Authenticator.kt

     * for (Challenge challenge : response.challenges()) {
     *   // If this is preemptive auth, use a preemptive credential.
     *   if (challenge.scheme().equalsIgnoreCase("OkHttp-Preemptive")) {
     *     return response.request().newBuilder()
     *         .header("Proxy-Authorization", "secret")
     *         .build();
     *   }
     * }
     * return null; // Didn't find a preemptive auth scheme.
     * ```
     *
     * ## Reactive Authentication
     *
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.5K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

      }
    
      // Digest auth is currently unsupported. Test that digest requests should fail reasonably.
      // http://code.google.com/p/android/issues/detail?id=11140
      @Test
      fun digestAuthentication() {
        val calls =
          authCallsForHeader(
            "WWW-Authenticate: Digest " +
              "realm=\"******@****.***\", qop=\"auth,auth-int\", " +
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 131.7K bytes
    - Viewed (0)
  4. mockwebserver/README.md

    final Dispatcher dispatcher = new Dispatcher() {
    
        @Override
        public MockResponse dispatch (RecordedRequest request) throws InterruptedException {
    
            switch (request.getPath()) {
                case "/v1/login/auth/":
                    return new MockResponse().setResponseCode(200);
                case "/v1/check/version/":
                    return new MockResponse().setResponseCode(200).setBody("version=9");
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Dec 17 15:34:10 GMT 2023
    - 5K bytes
    - Viewed (1)
  5. samples/guide/src/main/java/okhttp3/recipes/kt/YubikeyClientAuth.kt

    import javax.net.ssl.KeyStoreBuilderParameters
    import javax.net.ssl.SSLContext
    import javax.net.ssl.X509ExtendedKeyManager
    import javax.security.auth.callback.Callback
    import javax.security.auth.callback.CallbackHandler
    import javax.security.auth.callback.PasswordCallback
    import javax.security.auth.callback.UnsupportedCallbackException
    import okhttp3.OkHttpClient
    import okhttp3.Request
    import okhttp3.internal.SuppressSignatureCheck
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.2K bytes
    - Viewed (1)
  6. 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)
  7. okhttp/src/main/kotlin/okhttp3/Response.kt

       * Otherwise this returns an empty list of challenges.
       *
       * If a challenge uses the `token68` variant instead of auth params, there is exactly one
       * auth param in the challenge at key null. Invalid headers and challenges are ignored.
       * No semantic validation is done, for example that `Basic` auth must have a `realm`
       * auth param, this is up to the caller that interprets these challenges.
       */
      fun challenges(): List<Challenge> {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 15.5K bytes
    - Viewed (0)
  8. 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)
  9. okhttp/src/main/kotlin/okhttp3/Credentials.kt

    package okhttp3
    
    import java.nio.charset.Charset
    import kotlin.text.Charsets.ISO_8859_1
    import okio.ByteString.Companion.encode
    
    /** Factory for HTTP authorization credentials. */
    object Credentials {
      /** Returns an auth credential for the Basic scheme. */
      @JvmStatic @JvmOverloads
      fun basic(
        username: String,
        password: String,
        charset: Charset = ISO_8859_1,
      ): String {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.1K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/authenticator/JavaNetAuthenticator.kt

                url.toUrl(),
                Authenticator.RequestorType.SERVER,
              )
            }
    
          if (auth != null) {
            val credentialHeader = if (proxyAuthorization) "Proxy-Authorization" else "Authorization"
            val credential =
              Credentials.basic(
                auth.userName,
                String(auth.password),
                challenge.charset,
              )
            return request.newBuilder()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.2K bytes
    - Viewed (0)
Back to top