Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 16 for Basic (0.14 sec)

  1. tests/test_security_http_basic_realm.py

        assert response.headers["WWW-Authenticate"] == 'Basic realm="simple"'
    
    
    def test_security_http_basic_invalid_credentials():
        response = client.get(
            "/users/me", headers={"Authorization": "Basic notabase64token"}
        )
        assert response.status_code == 401, response.text
        assert response.headers["WWW-Authenticate"] == 'Basic realm="simple"'
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.6K bytes
    - Viewed (0)
  2. tests/test_security_http_basic_optional.py

    
    def test_security_http_basic_invalid_credentials():
        response = client.get(
            "/users/me", headers={"Authorization": "Basic notabase64token"}
        )
        assert response.status_code == 401, response.text
        assert response.headers["WWW-Authenticate"] == "Basic"
        assert response.json() == {"detail": "Invalid authentication credentials"}
    
    
    def test_security_http_basic_non_basic_credentials():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.6K bytes
    - Viewed (0)
  3. tests/test_security_http_basic_realm_description.py

        assert response.headers["WWW-Authenticate"] == 'Basic realm="simple"'
    
    
    def test_security_http_basic_invalid_credentials():
        response = client.get(
            "/users/me", headers={"Authorization": "Basic notabase64token"}
        )
        assert response.status_code == 401, response.text
        assert response.headers["WWW-Authenticate"] == 'Basic realm="simple"'
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.8K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_security/test_tutorial006_an.py

        assert response.headers["WWW-Authenticate"] == "Basic"
    
    
    def test_security_http_basic_invalid_credentials():
        response = client.get(
            "/users/me", headers={"Authorization": "Basic notabase64token"}
        )
        assert response.status_code == 401, response.text
        assert response.headers["WWW-Authenticate"] == "Basic"
        assert response.json() == {"detail": "Invalid authentication credentials"}
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.3K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_security/test_tutorial006.py

        assert response.headers["WWW-Authenticate"] == "Basic"
    
    
    def test_security_http_basic_invalid_credentials():
        response = client.get(
            "/users/me", headers={"Authorization": "Basic notabase64token"}
        )
        assert response.status_code == 401, response.text
        assert response.headers["WWW-Authenticate"] == "Basic"
        assert response.json() == {"detail": "Invalid authentication credentials"}
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.3K bytes
    - Viewed (0)
  6. tests/test_security_http_bearer.py

        assert response.json() == {"detail": "Not authenticated"}
    
    
    def test_security_http_bearer_incorrect_scheme_credentials():
        response = client.get("/users/me", headers={"Authorization": "Basic notreally"})
        assert response.status_code == 403, response.text
        assert response.json() == {"detail": "Invalid authentication credentials"}
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2K bytes
    - Viewed (0)
  7. docs/sts/client_grants/__init__.py

                # all duplicate headers and pick one.
                headers = {}
                headers['content-type'] = 'application/x-www-form-urlencoded'
                headers['authorization'] = urllib3.make_headers(
                    basic_auth='%s:%s' % (self.cid, self.csec))['authorization']
    
                response = self._http.urlopen('POST', self.idp_ep,
                                              body="grant_type=client_credentials",
    Python
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Apr 23 18:58:53 GMT 2021
    - 4.6K bytes
    - Viewed (1)
  8. fastapi/security/http.py

    class HTTPBasicCredentials(BaseModel):
        """
        The HTTP Basic credentials given as the result of using `HTTPBasic` in a
        dependency.
    
        Read more about it in the
        [FastAPI docs for HTTP Basic Auth](https://fastapi.tiangolo.com/advanced/security/http-basic-auth/).
        """
    
        username: Annotated[str, Doc("The HTTP Basic username.")]
        password: Annotated[str, Doc("The HTTP Basic password.")]
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Apr 19 15:29:38 GMT 2024
    - 13.2K bytes
    - Viewed (0)
  9. fastapi/security/oauth2.py

        client_id: optional string. OAuth2 recommends sending the client_id and client_secret (if any)
            using HTTP Basic auth, as: client_id:client_secret
        client_secret: optional string. OAuth2 recommends sending the client_id and client_secret (if any)
            using HTTP Basic auth, as: client_id:client_secret
        """
    
        def __init__(
            self,
            grant_type: Annotated[
                str,
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 21.1K bytes
    - Viewed (1)
  10. tests/test_tutorial/test_security/test_tutorial006_an_py39.py

        assert response.headers["WWW-Authenticate"] == "Basic"
    
    
    @needs_py39
    def test_security_http_basic_invalid_credentials(client: TestClient):
        response = client.get(
            "/users/me", headers={"Authorization": "Basic notabase64token"}
        )
        assert response.status_code == 401, response.text
        assert response.headers["WWW-Authenticate"] == "Basic"
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.5K bytes
    - Viewed (0)
Back to top