Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 88 for authorization (0.42 sec)

  1. okhttp-testing-support/src/main/kotlin/okhttp3/internal/RecordingOkAuthenticator.kt

        responses += response
        routes += route
        if (!schemeMatches(response) || credential == null) return null
        val header =
          when (response.code) {
            407 -> "Proxy-Authorization"
            else -> "Authorization"
          }
        return response.request
          .newBuilder()
          .addHeader(header, credential)
          .build()
      }
    
      private fun schemeMatches(response: Response): Boolean {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 1.7K bytes
    - Viewed (0)
  2. okhttp/src/commonJvmAndroid/kotlin/okhttp3/Authenticator.kt

     * and the implementation should respond with a new request that sets the "Authorization" header.
     *
     * ```java
     * if (response.request().header("Authorization") != null) {
     *   return null; // Give up, we've already failed to authenticate.
     * }
     *
     * String credential = Credentials.basic(...)
     * return response.request().newBuilder()
     *     .header("Authorization", credential)
     *     .build();
     * ```
     *
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Dec 27 13:39:56 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  3. okhttp/src/jvmTest/kotlin/okhttp3/HeadersTest.kt

            .add("content-length", "99")
            .add("authorization", "peanutbutter")
            .add("proxy-authorization", "chocolate")
            .add("cookie", "drink=coffee")
            .add("set-cookie", "accessory=sugar")
            .add("user-agent", "OkHttp")
            .build()
        assertThat(headers.toString()).isEqualTo(
          """
          |content-length: 99
          |authorization: ██
          |proxy-authorization: ██
          |cookie: ██
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 8.7K bytes
    - Viewed (0)
  4. src/test/java/org/codelibs/fess/helper/AccessTokenHelperTest.java

            req.addHeader("Authorization", "Bearer " + token);
            assertEquals(token, accessTokenHelper.getAccessTokenFromRequest(req));
        }
    
        public void test_getAccessTokenFromRequest_ok1() {
            final String token = accessTokenHelper.generateAccessToken();
            MockletHttpServletRequest req = getMockRequest();
            req.addHeader("Authorization", token);
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Thu Jul 10 13:41:04 UTC 2025
    - 6.5K bytes
    - Viewed (0)
  5. src/main/java/org/codelibs/fess/sso/oic/OpenIdConnectAuthenticator.java

            }).orElse(null);
        }
    
        /**
         * Gets the authorization URL for OpenID Connect.
         *
         * @param request the HTTP servlet request
         * @return the authorization URL
         */
        protected String getAuthUrl(final HttpServletRequest request) {
            final String state = UuidUtil.create();
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Thu Jul 17 08:28:31 UTC 2025
    - 15.3K bytes
    - Viewed (0)
  6. okhttp/src/commonJvmAndroid/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
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 3.2K bytes
    - Viewed (0)
  7. samples/guide/src/main/java/okhttp3/recipes/Authenticate.java

    public final class Authenticate {
      private final OkHttpClient client;
    
      public Authenticate() {
        client = new OkHttpClient.Builder()
            .authenticator((route, response) -> {
              if (response.request().header("Authorization") != null) {
                return null; // Give up, we've already attempted to authenticate.
              }
    
              System.out.println("Authenticating for response: " + response);
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Aug 12 07:26:27 UTC 2021
    - 1.9K bytes
    - Viewed (0)
  8. okhttp/src/jvmTest/kotlin/okhttp3/RequestTest.kt

      }
    
      @Test
      fun requestToStringRedactsSensitiveHeaders() {
        val headers =
          Headers
            .Builder()
            .add("content-length", "99")
            .add("authorization", "peanutbutter")
            .add("proxy-authorization", "chocolate")
            .add("cookie", "drink=coffee")
            .add("set-cookie", "accessory=sugar")
            .add("user-agent", "OkHttp")
            .build()
        val request =
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 16 09:39:51 UTC 2025
    - 19K bytes
    - Viewed (0)
  9. okhttp/src/jvmTest/kotlin/okhttp3/RequestCommonTest.kt

      }
    
      @Test
      fun requestToStringRedactsSensitiveHeaders() {
        val headers =
          Headers
            .Builder()
            .add("content-length", "99")
            .add("authorization", "peanutbutter")
            .add("proxy-authorization", "chocolate")
            .add("cookie", "drink=coffee")
            .add("set-cookie", "accessory=sugar")
            .add("user-agent", "OkHttp")
            .build()
        val request =
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 10.8K bytes
    - Viewed (0)
  10. src/main/java/org/codelibs/fess/exception/InvalidAccessTokenException.java

     */
    package org.codelibs.fess.exception;
    
    /**
     * Exception thrown when an invalid access token is encountered.
     * This exception is typically used in authentication and authorization contexts
     * where a provided access token is invalid, expired, or malformed.
     */
    public class InvalidAccessTokenException extends FessSystemException {
    
        /** Serial version UID for serialization */
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Thu Jul 17 08:28:31 UTC 2025
    - 1.6K bytes
    - Viewed (0)
Back to top