Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 802 for Hosken (0.17 sec)

  1. docs_src/app_testing/app_b_py310/main.py

    async def read_main(item_id: str, x_token: str = Header()):
        if x_token != fake_secret_token:
            raise HTTPException(status_code=400, detail="Invalid X-Token header")
        if item_id not in fake_db:
            raise HTTPException(status_code=404, detail="Item not found")
        return fake_db[item_id]
    
    
    @app.post("/items/", response_model=Item)
    async def create_item(item: Item, x_token: str = Header()):
        if x_token != fake_secret_token:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Jan 09 14:44:08 GMT 2024
    - 1.1K bytes
    - Viewed (0)
  2. docs_src/app_testing/app_b_an/main.py

    async def read_main(item_id: str, x_token: Annotated[str, Header()]):
        if x_token != fake_secret_token:
            raise HTTPException(status_code=400, detail="Invalid X-Token header")
        if item_id not in fake_db:
            raise HTTPException(status_code=404, detail="Item not found")
        return fake_db[item_id]
    
    
    @app.post("/items/", response_model=Item)
    async def create_item(item: Item, x_token: Annotated[str, Header()]):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 1.2K bytes
    - Viewed (0)
  3. docs/de/docs/tutorial/security/first-steps.md

    * Die API überprüft den `username` und das `password` und antwortet mit einem „Token“ (wir haben davon noch nichts implementiert).
        * Ein „Token“ ist lediglich ein String mit einem Inhalt, den wir später verwenden können, um diesen Benutzer zu verifizieren.
        * Normalerweise läuft ein Token nach einiger Zeit ab.
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 30 18:07:08 GMT 2024
    - 10.3K bytes
    - Viewed (0)
  4. analysis/analysis-api-fir/src/org/jetbrains/kotlin/analysis/api/fir/evaluate/FirAnnotationValueConverter.kt

                                        },
                                        token = token
                                    ),
                                    token
                                )
                            } else null
                        }
    
                        is FirNamedFunctionSymbol -> {
    Plain Text
    - Registered: Fri Apr 26 08:18:10 GMT 2024
    - Last Modified: Thu Apr 25 07:15:56 GMT 2024
    - 11.7K bytes
    - Viewed (0)
  5. tests/test_security_oauth2_authorization_code_bearer.py

    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)
    
    
    def test_no_token():
        response = client.get("/items")
        assert response.status_code == 401, response.text
    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_tutorial/test_security/test_tutorial005_an_py310.py

                        },
                    },
                    "Token": {
                        "title": "Token",
                        "required": ["access_token", "token_type"],
                        "type": "object",
                        "properties": {
                            "access_token": {"title": "Access Token", "type": "string"},
                            "token_type": {"title": "Token Type", "type": "string"},
                        },
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.3K bytes
    - Viewed (0)
  7. src/bufio/example_test.go

    	// Create a custom split function by wrapping the existing ScanWords function.
    	split := func(data []byte, atEOF bool) (advance int, token []byte, err error) {
    		advance, token, err = bufio.ScanWords(data, atEOF)
    		if err == nil && token != nil {
    			_, err = strconv.ParseInt(string(token), 10, 32)
    		}
    		return
    	}
    	// Set the split function for the scanning operation.
    	scanner.Split(split)
    	// Validate the input
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Mon Oct 23 09:06:30 GMT 2023
    - 4.9K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_security/test_tutorial005_py39.py

                        },
                    },
                    "Token": {
                        "title": "Token",
                        "required": ["access_token", "token_type"],
                        "type": "object",
                        "properties": {
                            "access_token": {"title": "Access Token", "type": "string"},
                            "token_type": {"title": "Token Type", "type": "string"},
                        },
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.3K bytes
    - Viewed (0)
  9. docs_src/security/tutorial005.py

        return current_user
    
    
    @app.post("/token")
    async def login_for_access_token(
        form_data: OAuth2PasswordRequestForm = Depends(),
    ) -> Token:
        user = authenticate_user(fake_users_db, form_data.username, form_data.password)
        if not user:
            raise HTTPException(status_code=400, detail="Incorrect username or password")
        access_token_expires = timedelta(minutes=ACCESS_TOKEN_EXPIRE_MINUTES)
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 5.1K bytes
    - Viewed (0)
  10. docs_src/security/tutorial005_an_py39.py

            data={"sub": user.username, "scopes": form_data.scopes},
            expires_delta=access_token_expires,
        )
        return Token(access_token=access_token, token_type="bearer")
    
    
    @app.get("/users/me/", response_model=User)
    async def read_users_me(
        current_user: Annotated[User, Depends(get_current_active_user)],
    ):
        return current_user
    
    
    @app.get("/users/me/items/")
    async def read_own_items(
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 5.2K bytes
    - Viewed (0)
Back to top