Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 69 for Authorize (0.05 seconds)

  1. tests/test_security_oauth2_authorization_code_bearer_description.py

    from fastapi import FastAPI, Security
    from fastapi.security import OAuth2AuthorizationCodeBearer
    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    oauth2_scheme = OAuth2AuthorizationCodeBearer(
        authorizationUrl="authorize",
        tokenUrl="token",
        description="OAuth2 Code Bearer",
        auto_error=True,
    )
    
    
    @app.get("/items/")
    async def read_items(token: Optional[str] = Security(oauth2_scheme)):
        return {"token": token}
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.4K bytes
    - Click Count (0)
  2. tests/test_security_oauth2_authorization_code_bearer_scopes_openapi_simple.py

    from fastapi.security import OAuth2AuthorizationCodeBearer
    from fastapi.testclient import TestClient
    from inline_snapshot import snapshot
    
    oauth2_scheme = OAuth2AuthorizationCodeBearer(
        authorizationUrl="api/oauth/authorize",
        tokenUrl="/api/oauth/token",
        scopes={"read": "Read access", "write": "Write access"},
    )
    
    
    async def get_token(token: Annotated[str, Depends(oauth2_scheme)]) -> str:
        return token
    
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 21:25:59 GMT 2025
    - 2.6K bytes
    - Click Count (0)
  3. tests/test_security_oauth2_authorization_code_bearer.py

    from fastapi import FastAPI, Security
    from fastapi.security import OAuth2AuthorizationCodeBearer
    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    oauth2_scheme = OAuth2AuthorizationCodeBearer(
        authorizationUrl="authorize", tokenUrl="token", auto_error=True
    )
    
    
    @app.get("/items/")
    async def read_items(token: Optional[str] = Security(oauth2_scheme)):
        return {"token": token}
    
    
    client = TestClient(app)
    
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.3K bytes
    - Click Count (0)
  4. tests/test_security_oauth2_authorization_code_bearer_scopes_openapi.py

    from fastapi.security import OAuth2AuthorizationCodeBearer
    from fastapi.testclient import TestClient
    from inline_snapshot import snapshot
    
    oauth2_scheme = OAuth2AuthorizationCodeBearer(
        authorizationUrl="authorize",
        tokenUrl="token",
        auto_error=True,
        scopes={"read": "Read access", "write": "Write access"},
    )
    
    
    async def get_token(token: Annotated[str, Depends(oauth2_scheme)]) -> str:
        return token
    
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 21:25:59 GMT 2025
    - 6.6K bytes
    - Click Count (0)
  5. docs/zh/docs/tutorial/security/first-steps.md

    界面如下图所示:
    
    <img src="/img/tutorial/security/image01.png">
    
    /// check | Authorize 按钮!
    
    页面右上角出现了一个「**Authorize**」按钮。
    
    *路径操作*的右上角也出现了一个可以点击的小锁图标。
    
    ///
    
    点击 **Authorize** 按钮,弹出授权表单,输入 `username` 与 `password` 及其它可选字段:
    
    <img src="/img/tutorial/security/image02.png">
    
    /// note | 笔记
    
    目前,在表单中输入内容不会有任何反应,后文会介绍相关内容。
    
    ///
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Mon Nov 18 02:25:44 GMT 2024
    - 7K bytes
    - Click Count (0)
  6. docs/en/docs/tutorial/security/first-steps.md

    You will see something like this:
    
    <img src="/img/tutorial/security/image01.png">
    
    /// check | Authorize button!
    
    You already have a shiny new "Authorize" button.
    
    And your *path operation* has a little lock in the top-right corner that you can click.
    
    ///
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sun Aug 31 09:15:41 GMT 2025
    - 8.4K bytes
    - Click Count (0)
  7. docs/de/docs/tutorial/security/first-steps.md

    Sie werden etwa Folgendes sehen:
    
    <img src="/img/tutorial/security/image01.png">
    
    /// check | Authorize-Button!
    
    Sie haben bereits einen glänzenden, neuen „Authorize“-Button.
    
    Und Ihre *Pfadoperation* hat in der oberen rechten Ecke ein kleines Schloss, auf das Sie klicken können.
    
    ///
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Sep 20 15:10:09 GMT 2025
    - 9.9K bytes
    - Click Count (0)
  8. docs/en/docs/tutorial/security/oauth2-jwt.md

    You'll see the user interface like:
    
    <img src="/img/tutorial/security/image07.png">
    
    Authorize the application the same way as before.
    
    Using the credentials:
    
    Username: `johndoe`
    Password: `secret`
    
    /// check
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Mon Sep 29 02:57:38 GMT 2025
    - 10.6K bytes
    - Click Count (0)
  9. docs/en/docs/advanced/security/oauth2-scopes.md

    {* ../../docs_src/security/tutorial005_an_py310.py hl[63:66] *}
    
    Because we are now declaring those scopes, they will show up in the API docs when you log-in/authorize.
    
    And you will be able to select which scopes you want to give access to: `me` and `items`.
    
    This is the same mechanism used when you give permissions while logging in with Facebook, Google, GitHub, etc:
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sun Aug 31 10:49:48 GMT 2025
    - 13.5K bytes
    - Click Count (0)
  10. docs/metrics/prometheus/README.md

    ## List of metrics exposed by MinIO
    
    - MinIO exports Prometheus compatible data by default as an authorized endpoint at `/minio/v2/metrics/cluster`. 
    - MinIO exports Prometheus compatible data by default which is bucket centric as an authorized endpoint at `/minio/v2/metrics/bucket`.
    - MinIO exports Prometheus compatible data by default which is node centric as an authorized endpoint at `/minio/v2/metrics/node`.
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Tue Aug 12 18:20:36 GMT 2025
    - 7.1K bytes
    - Click Count (0)
Back to Top