Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 228 for Me (0.01 sec)

  1. tests/test_security_http_bearer.py

    app = FastAPI()
    
    security = HTTPBearer()
    
    
    @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_bearer():
        response = client.get("/users/me", headers={"Authorization": "Bearer foobar"})
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 2K bytes
    - Viewed (0)
  2. tests/test_security_http_digest_description.py

    security = HTTPDigest(description="HTTPDigest 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_digest():
        response = client.get("/users/me", headers={"Authorization": "Digest foobar"})
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  3. tests/test_security_http_bearer_description.py

    security = HTTPBearer(description="HTTP Bearer token 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_bearer():
        response = client.get("/users/me", headers={"Authorization": "Bearer foobar"})
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  4. src/main/java/jcifs/smb1/util/mime.map

    application/x-texinfo          texinfo texi     # TexInfo
    application/x-troff            t tr roff        # Troff file
    application/x-troff-man        man              # Troff with MAN macros
    application/x-troff-me         me               # Troff with ME macros
    application/x-troff-ms         ms               # Troff with MS macros
    application/x-ustar            ustar            # Ustar file
    application/vnd.ms-access      mdb mda mde      # MS Access
    Registered: Sun Nov 03 00:10:13 UTC 2024
    - Last Modified: Fri Mar 22 20:39:42 UTC 2019
    - 5.9K bytes
    - Viewed (0)
  5. build-logic/binary-compatibility/src/main/groovy/gradlebuild/binarycompatibility/rules/AcceptedRegressionsRuleSetup.java

     */
    
    package gradlebuild.binarycompatibility.rules;
    
    import gradlebuild.binarycompatibility.AcceptedApiChanges;
    import gradlebuild.binarycompatibility.ApiChange;
    import me.champeau.gradle.japicmp.report.SetupRule;
    import me.champeau.gradle.japicmp.report.ViolationCheckContext;
    
    import java.util.HashSet;
    import java.util.Map;
    import java.util.Set;
    
    public class AcceptedRegressionsRuleSetup implements SetupRule {
    
    Registered: Wed Nov 06 11:36:14 UTC 2024
    - Last Modified: Wed Dec 09 08:14:05 UTC 2020
    - 1.6K bytes
    - Viewed (0)
  6. tests/test_security_api_key_query.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?key=secret")
        assert response.status_code == 200, response.text
        assert response.json() == {"username": "secret"}
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 1.8K bytes
    - Viewed (0)
  7. 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"})
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 1.9K bytes
    - Viewed (0)
  8. 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"}
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 2.5K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_security/test_tutorial003_an.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
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 8K bytes
    - Viewed (0)
  10. docs/em/docs/tutorial/path-params.md

    ๐Ÿ’– `/users/me`, โžก๏ธ ๐Ÿ’ฌ ๐Ÿ‘ˆ โšซ๏ธ ๐Ÿคš ๐Ÿ“Š ๐Ÿ”ƒ โฎ๏ธ ๐Ÿ‘ฉโ€๐Ÿ’ป.
    
    & โคด๏ธ ๐Ÿ‘† ๐Ÿ’ช โœ”๏ธ โžก `/users/{user_id}` ๐Ÿคš ๐Ÿ’ฝ ๐Ÿ”ƒ ๐ŸŽฏ ๐Ÿ‘ฉโ€๐Ÿ’ป ๐Ÿ‘ฉโ€๐Ÿ’ป ๐Ÿ†”.
    
    โ†ฉ๏ธ *โžก ๐Ÿ› ๏ธ* ๐Ÿ”ฌ โœ”, ๐Ÿ‘† ๐Ÿ’ช โš’ ๐Ÿ’ญ ๐Ÿ‘ˆ โžก `/users/me` ๐Ÿ“ฃ โญ 1๏ธโƒฃ `/users/{user_id}`:
    
    ```Python hl_lines="6  11"
    {!../../docs_src/path_params/tutorial003.py!}
    ```
    
    โช, โžก `/users/{user_id}` ๐Ÿ”œ ๐Ÿ `/users/me`, "๐Ÿ’ญ" ๐Ÿ‘ˆ โšซ๏ธ ๐Ÿ“จ ๐Ÿ”ข `user_id` โฎ๏ธ ๐Ÿ’ฒ `"me"`.
    
    โžก, ๐Ÿ‘† ๐Ÿšซ๐Ÿ”œ โ†” โžก ๐Ÿ› ๏ธ:
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 7.7K bytes
    - Viewed (0)
Back to top