- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 169 for Authenticate (0.08 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 Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.9K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial005.py
assert response.headers["WWW-Authenticate"] == 'Bearer scope="me"' def test_incorrect_token_type(): response = client.get( "/users/me", headers={"Authorization": "Notexistent testtoken"} ) assert response.status_code == 401, response.text assert response.json() == {"detail": "Not authenticated"} assert response.headers["WWW-Authenticate"] == "Bearer" def test_verify_password():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Mar 13 19:07:10 UTC 2024 - 15.4K bytes - Viewed (0) -
okhttp/src/main/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 Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 5.5K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial005_an.py
assert response.headers["WWW-Authenticate"] == 'Bearer scope="me"' def test_incorrect_token_type(): response = client.get( "/users/me", headers={"Authorization": "Notexistent testtoken"} ) assert response.status_code == 401, response.text assert response.json() == {"detail": "Not authenticated"} assert response.headers["WWW-Authenticate"] == "Bearer" def test_verify_password():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Mar 13 19:07:10 UTC 2024 - 15.4K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/HeadersChallengesTest.kt
.add("WWW-Authenticate", "Basic realm=myrealm") .add("WWW-Authenticate", "Digest") .build() assertThat(headers.parseChallenges("WWW-Authenticate")).containsExactly( Challenge("Basic", mapOf("realm" to "myrealm")), Challenge("Digest", mapOf()), ) } @Test fun multipleBasicAuthenticateHeaders() { val headers = Headers.Builder()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 16.6K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial005_py310.py
@needs_py310 def test_no_token(client: TestClient): response = client.get("/users/me") assert response.status_code == 401, response.text assert response.json() == {"detail": "Not authenticated"} assert response.headers["WWW-Authenticate"] == "Bearer" @needs_py310 def test_token(client: TestClient): access_token = get_access_token(scope="me", client=client) response = client.get(
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Mar 13 19:07:10 UTC 2024 - 16.3K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial005_py39.py
@needs_py39 def test_no_token(client: TestClient): response = client.get("/users/me") assert response.status_code == 401, response.text assert response.json() == {"detail": "Not authenticated"} assert response.headers["WWW-Authenticate"] == "Bearer" @needs_py39 def test_token(client: TestClient): access_token = get_access_token(scope="me", client=client) response = client.get(
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Mar 13 19:07:10 UTC 2024 - 16.3K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial005_an_py310.py
@needs_py310 def test_no_token(client: TestClient): response = client.get("/users/me") assert response.status_code == 401, response.text assert response.json() == {"detail": "Not authenticated"} assert response.headers["WWW-Authenticate"] == "Bearer" @needs_py310 def test_token(client: TestClient): access_token = get_access_token(scope="me", client=client) response = client.get(
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Mar 13 19:07:10 UTC 2024 - 16.3K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial005_an_py39.py
@needs_py39 def test_no_token(client: TestClient): response = client.get("/users/me") assert response.status_code == 401, response.text assert response.json() == {"detail": "Not authenticated"} assert response.headers["WWW-Authenticate"] == "Bearer" @needs_py39 def test_token(client: TestClient): access_token = get_access_token(scope="me", client=client) response = client.get(
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Mar 13 19:07:10 UTC 2024 - 16.3K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial006.py
def test_security_http_basic_no_credentials(): response = client.get("/users/me") assert response.json() == {"detail": "Not authenticated"} assert response.status_code == 401, response.text assert response.headers["WWW-Authenticate"] == "Basic" def test_security_http_basic_invalid_credentials(): response = client.get( "/users/me", headers={"Authorization": "Basic notabase64token"}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.3K bytes - Viewed (0)