Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 22 for Indirect (0.15 sec)

  1. tests/test_tutorial/test_custom_docs_ui/test_tutorial001.py

        )
        assert "https://unpkg.com/swagger-ui-dist@5.9.0/swagger-ui.css" in response.text
    
    
    def test_swagger_ui_oauth2_redirect_html(client: TestClient):
        response = client.get("/docs/oauth2-redirect")
        assert response.status_code == 200, response.text
        assert "window.opener.swaggerUIRedirectOauth2" in response.text
    
    
    def test_redoc_html(client: TestClient):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Mon Oct 30 09:58:58 GMT 2023
    - 1.3K bytes
    - Viewed (0)
  2. docs/sts/web-identity.py

        # Save it for use later to prevent xsrf attacks
    
        state = str(uuid4())
        params = {"client_id": client_id,
                  "response_type": "code",
                  "state": state,
                  "redirect_uri": callback_uri,
                  "scope": "openid"}
    
        url = authorize_url + "?" + urllib.parse.urlencode(params)
        return url
    
    
    @app.route('/oauth2/callback')
    def callback():
    Python
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Jul 28 01:37:51 GMT 2021
    - 2.9K bytes
    - Viewed (1)
  3. docs_src/custom_response/tutorial006.py

    from fastapi import FastAPI
    from fastapi.responses import RedirectResponse
    
    app = FastAPI()
    
    
    @app.get("/typer")
    async def redirect_typer():
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Jul 03 19:51:28 GMT 2021
    - 199 bytes
    - Viewed (0)
  4. tests/test_custom_swagger_ui_redirect.py

    from fastapi import FastAPI
    from fastapi.testclient import TestClient
    
    swagger_ui_oauth2_redirect_url = "/docs/redirect"
    
    app = FastAPI(swagger_ui_oauth2_redirect_url=swagger_ui_oauth2_redirect_url)
    
    
    @app.get("/items/")
    async def read_items():
        return {"id": "foo"}
    
    
    client = TestClient(app)
    
    
    def test_swagger_ui():
        response = client.get("/docs")
        assert response.status_code == 200, response.text
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Apr 08 04:37:38 GMT 2020
    - 1.1K bytes
    - Viewed (0)
  5. tests/test_no_swagger_ui_redirect.py

        print(client.base_url)
        assert "oauth2RedirectUrl" not in response.text
    
    
    def test_swagger_ui_no_oauth2_redirect():
        response = client.get("/docs/oauth2-redirect")
        assert response.status_code == 404, response.text
    
    
    def test_response():
        response = client.get("/items/")
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Apr 08 04:37:38 GMT 2020
    - 786 bytes
    - Viewed (0)
  6. fastapi/openapi/docs.py

                """
            ),
        ] = "https://fastapi.tiangolo.com/img/favicon.png",
        oauth2_redirect_url: Annotated[
            Optional[str],
            Doc(
                """
                The OAuth2 redirect URL, it is normally automatically handled by FastAPI.
                """
            ),
        ] = None,
        init_oauth: Annotated[
            Optional[Dict[str, Any]],
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 10.1K bytes
    - Viewed (0)
  7. fastapi/applications.py

                    oauth2_redirect_url = self.swagger_ui_oauth2_redirect_url
                    if oauth2_redirect_url:
                        oauth2_redirect_url = root_path + oauth2_redirect_url
                    return get_swagger_ui_html(
                        openapi_url=openapi_url,
                        title=f"{self.title} - Swagger UI",
                        oauth2_redirect_url=oauth2_redirect_url,
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 172.2K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_custom_response/test_tutorial006.py

            "openapi": "3.1.0",
            "info": {"title": "FastAPI", "version": "0.1.0"},
            "paths": {
                "/typer": {
                    "get": {
                        "summary": "Redirect Typer",
                        "operationId": "redirect_typer_typer_get",
                        "responses": {
                            "200": {
                                "description": "Successful Response",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 1K bytes
    - Viewed (0)
  9. docs_src/custom_response/tutorial006c.py

    from fastapi import FastAPI
    from fastapi.responses import RedirectResponse
    
    app = FastAPI()
    
    
    @app.get("/pydantic", response_class=RedirectResponse, status_code=302)
    async def redirect_pydantic():
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 237 bytes
    - Viewed (0)
  10. tests/test_tutorial/test_response_model/test_tutorial003_02.py

    
    def test_get_portal():
        response = client.get("/portal")
        assert response.status_code == 200, response.text
        assert response.json() == {"message": "Here's your interdimensional portal."}
    
    
    def test_get_redirect():
        response = client.get("/portal", params={"teleport": True}, follow_redirects=False)
        assert response.status_code == 307, response.text
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 3.4K bytes
    - Viewed (0)
Back to top