Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 225 for ME (0.19 sec)

  1. tests/test_security_http_bearer_optional.py

    client = TestClient(app)
    
    
    def test_security_http_bearer():
        response = client.get("/users/me", headers={"Authorization": "Bearer foobar"})
        assert response.status_code == 200, response.text
        assert response.json() == {"scheme": "Bearer", "credentials": "foobar"}
    
    
    def test_security_http_bearer_no_credentials():
        response = client.get("/users/me")
        assert response.status_code == 200, response.text
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.1K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_security/test_tutorial005_py39.py

                                },
                            }
                        },
                        "summary": "Read Users Me",
                        "operationId": "read_users_me_users_me__get",
                        "security": [{"OAuth2PasswordBearer": ["me"]}],
                    }
                },
                "/users/me/items/": {
                    "get": {
                        "responses": {
                            "200": {
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.3K bytes
    - Viewed (0)
  3. tests/test_security_http_digest_optional.py

    client = TestClient(app)
    
    
    def test_security_http_digest():
        response = client.get("/users/me", headers={"Authorization": "Digest foobar"})
        assert response.status_code == 200, response.text
        assert response.json() == {"scheme": "Digest", "credentials": "foobar"}
    
    
    def test_security_http_digest_no_credentials():
        response = client.get("/users/me")
        assert response.status_code == 200, response.text
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.2K bytes
    - Viewed (0)
  4. tests/test_security_http_base_description.py

    security = HTTPBase(scheme="Other", description="Other Security Scheme")
    
    
    @app.get("/users/me")
    def read_current_user(credentials: HTTPAuthorizationCredentials = Security(security)):
        return {"scheme": credentials.scheme, "credentials": credentials.credentials}
    
    
    client = TestClient(app)
    
    
    def test_security_http_base():
        response = client.get("/users/me", headers={"Authorization": "Other foobar"})
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 1.9K bytes
    - Viewed (0)
  5. tests/test_security_api_key_header_description.py

        user = User(username=oauth_header)
        return user
    
    
    @app.get("/users/me")
    def read_current_user(current_user: User = Depends(get_current_user)):
        return current_user
    
    
    client = TestClient(app)
    
    
    def test_security_api_key():
        response = client.get("/users/me", headers={"key": "secret"})
        assert response.status_code == 200, response.text
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2K bytes
    - Viewed (0)
  6. istioctl/pkg/metrics/metrics.go

    	if err != nil {
    		me = multierror.Append(me, err)
    	}
    	sm.p50Latency = p50Latency
    
    	p90Latency, err := getLatency(promAPI, wname, wns, duration, 0.9)
    	if err != nil {
    		me = multierror.Append(me, err)
    	}
    	sm.p90Latency = p90Latency
    
    	p99Latency, err := getLatency(promAPI, wname, wns, duration, 0.99)
    	if err != nil {
    		me = multierror.Append(me, err)
    	}
    	sm.p99Latency = p99Latency
    
    	if me.ErrorOrNil() != nil {
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Sat Apr 13 05:23:38 GMT 2024
    - 8.4K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_security/test_tutorial006_an_py39.py

    @needs_py39
    def test_security_http_basic(client: TestClient):
        response = client.get("/users/me", auth=("john", "secret"))
        assert response.status_code == 200, response.text
        assert response.json() == {"username": "john", "password": "secret"}
    
    
    @needs_py39
    def test_security_http_basic_no_credentials(client: TestClient):
        response = client.get("/users/me")
        assert response.json() == {"detail": "Not authenticated"}
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.5K bytes
    - Viewed (0)
  8. docs_src/path_params/tutorial003.py

    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/users/me")
    async def read_user_me():
        return {"user_id": "the current user"}
    
    
    @app.get("/users/{user_id}")
    async def read_user(user_id: str):
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 236 bytes
    - Viewed (0)
  9. tests/test_tutorial/test_security/test_tutorial003.py

    
    def test_no_token():
        response = client.get("/users/me")
        assert response.status_code == 401, response.text
        assert response.json() == {"detail": "Not authenticated"}
        assert response.headers["WWW-Authenticate"] == "Bearer"
    
    
    def test_token():
        response = client.get("/users/me", headers={"Authorization": "Bearer johndoe"})
        assert response.status_code == 200, response.text
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 8K bytes
    - Viewed (0)
  10. docs/pt/docs/help-fastapi.md

    * <a href="https://github.com/tiangolo" class="external-link" target="_blank">Me siga no **GitHub**</a>.
        * Ver também outros projetos Open Source criados por mim que podem te ajudar.
        * Me seguir para saber quando um novo projeto Open Source for criado.
    * <a href="https://twitter.com/tiangolo" class="external-link" target="_blank">Me siga no **Twitter**</a>.
        * Me dizer o motivo pelo o qual você está usando o FastAPI(Adoro ouvir esse tipo de comentário).
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 8.4K bytes
    - Viewed (0)
Back to top